1
0

config.sub 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695
  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 | dvp \
  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[24]a*eb | 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[24]a*eb-* | 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. mipsEE* | ee | ps2)
  707. basic_machine=mips64r5900el-scei
  708. case $os in
  709. -linux*)
  710. ;;
  711. *)
  712. os=-elf
  713. ;;
  714. esac
  715. ;;
  716. iop)
  717. basic_machine=mipsel-scei
  718. os=-irx
  719. ;;
  720. dvp)
  721. basic_machine=dvp-scei
  722. os=-elf
  723. ;;
  724. mips3*-*)
  725. basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
  726. ;;
  727. mips3*)
  728. basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
  729. ;;
  730. monitor)
  731. basic_machine=m68k-rom68k
  732. os=-coff
  733. ;;
  734. morphos)
  735. basic_machine=powerpc-unknown
  736. os=-morphos
  737. ;;
  738. msdos)
  739. basic_machine=i386-pc
  740. os=-msdos
  741. ;;
  742. ms1-*)
  743. basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
  744. ;;
  745. mvs)
  746. basic_machine=i370-ibm
  747. os=-mvs
  748. ;;
  749. ncr3000)
  750. basic_machine=i486-ncr
  751. os=-sysv4
  752. ;;
  753. netbsd386)
  754. basic_machine=i386-unknown
  755. os=-netbsd
  756. ;;
  757. netwinder)
  758. basic_machine=armv4l-rebel
  759. os=-linux
  760. ;;
  761. news | news700 | news800 | news900)
  762. basic_machine=m68k-sony
  763. os=-newsos
  764. ;;
  765. news1000)
  766. basic_machine=m68030-sony
  767. os=-newsos
  768. ;;
  769. news-3600 | risc-news)
  770. basic_machine=mips-sony
  771. os=-newsos
  772. ;;
  773. necv70)
  774. basic_machine=v70-nec
  775. os=-sysv
  776. ;;
  777. next | m*-next )
  778. basic_machine=m68k-next
  779. case $os in
  780. -nextstep* )
  781. ;;
  782. -ns2*)
  783. os=-nextstep2
  784. ;;
  785. *)
  786. os=-nextstep3
  787. ;;
  788. esac
  789. ;;
  790. nh3000)
  791. basic_machine=m68k-harris
  792. os=-cxux
  793. ;;
  794. nh[45]000)
  795. basic_machine=m88k-harris
  796. os=-cxux
  797. ;;
  798. nindy960)
  799. basic_machine=i960-intel
  800. os=-nindy
  801. ;;
  802. mon960)
  803. basic_machine=i960-intel
  804. os=-mon960
  805. ;;
  806. nonstopux)
  807. basic_machine=mips-compaq
  808. os=-nonstopux
  809. ;;
  810. np1)
  811. basic_machine=np1-gould
  812. ;;
  813. nsr-tandem)
  814. basic_machine=nsr-tandem
  815. ;;
  816. op50n-* | op60c-*)
  817. basic_machine=hppa1.1-oki
  818. os=-proelf
  819. ;;
  820. openrisc | openrisc-*)
  821. basic_machine=or32-unknown
  822. ;;
  823. os400)
  824. basic_machine=powerpc-ibm
  825. os=-os400
  826. ;;
  827. OSE68000 | ose68000)
  828. basic_machine=m68000-ericsson
  829. os=-ose
  830. ;;
  831. os68k)
  832. basic_machine=m68k-none
  833. os=-os68k
  834. ;;
  835. pa-hitachi)
  836. basic_machine=hppa1.1-hitachi
  837. os=-hiuxwe2
  838. ;;
  839. paragon)
  840. basic_machine=i860-intel
  841. os=-osf
  842. ;;
  843. parisc)
  844. basic_machine=hppa-unknown
  845. os=-linux
  846. ;;
  847. parisc-*)
  848. basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
  849. os=-linux
  850. ;;
  851. pbd)
  852. basic_machine=sparc-tti
  853. ;;
  854. pbb)
  855. basic_machine=m68k-tti
  856. ;;
  857. pc532 | pc532-*)
  858. basic_machine=ns32k-pc532
  859. ;;
  860. pc98)
  861. basic_machine=i386-pc
  862. ;;
  863. pc98-*)
  864. basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
  865. ;;
  866. pentium | p5 | k5 | k6 | nexgen | viac3)
  867. basic_machine=i586-pc
  868. ;;
  869. pentiumpro | p6 | 6x86 | athlon | athlon_*)
  870. basic_machine=i686-pc
  871. ;;
  872. pentiumii | pentium2 | pentiumiii | pentium3)
  873. basic_machine=i686-pc
  874. ;;
  875. pentium4)
  876. basic_machine=i786-pc
  877. ;;
  878. pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
  879. basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
  880. ;;
  881. pentiumpro-* | p6-* | 6x86-* | athlon-*)
  882. basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
  883. ;;
  884. pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
  885. basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
  886. ;;
  887. pentium4-*)
  888. basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
  889. ;;
  890. pn)
  891. basic_machine=pn-gould
  892. ;;
  893. power) basic_machine=power-ibm
  894. ;;
  895. ppc) basic_machine=powerpc-unknown
  896. ;;
  897. ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
  898. ;;
  899. ppcle | powerpclittle | ppc-le | powerpc-little)
  900. basic_machine=powerpcle-unknown
  901. ;;
  902. ppcle-* | powerpclittle-*)
  903. basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
  904. ;;
  905. ppc64) basic_machine=powerpc64-unknown
  906. ;;
  907. ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
  908. ;;
  909. ppc64le | powerpc64little | ppc64-le | powerpc64-little)
  910. basic_machine=powerpc64le-unknown
  911. ;;
  912. ppc64le-* | powerpc64little-*)
  913. basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
  914. ;;
  915. ps2)
  916. basic_machine=i386-ibm
  917. ;;
  918. pw32)
  919. basic_machine=i586-unknown
  920. os=-pw32
  921. ;;
  922. rdos)
  923. basic_machine=i386-pc
  924. os=-rdos
  925. ;;
  926. rom68k)
  927. basic_machine=m68k-rom68k
  928. os=-coff
  929. ;;
  930. rm[46]00)
  931. basic_machine=mips-siemens
  932. ;;
  933. rtpc | rtpc-*)
  934. basic_machine=romp-ibm
  935. ;;
  936. s390 | s390-*)
  937. basic_machine=s390-ibm
  938. ;;
  939. s390x | s390x-*)
  940. basic_machine=s390x-ibm
  941. ;;
  942. sa29200)
  943. basic_machine=a29k-amd
  944. os=-udi
  945. ;;
  946. sb1)
  947. basic_machine=mipsisa64sb1-unknown
  948. ;;
  949. sb1el)
  950. basic_machine=mipsisa64sb1el-unknown
  951. ;;
  952. sde)
  953. basic_machine=mipsisa32-sde
  954. os=-elf
  955. ;;
  956. sei)
  957. basic_machine=mips-sei
  958. os=-seiux
  959. ;;
  960. sequent)
  961. basic_machine=i386-sequent
  962. ;;
  963. sh)
  964. basic_machine=sh-hitachi
  965. os=-hms
  966. ;;
  967. sh5el)
  968. basic_machine=sh5le-unknown
  969. ;;
  970. sh64)
  971. basic_machine=sh64-unknown
  972. ;;
  973. sparclite-wrs | simso-wrs)
  974. basic_machine=sparclite-wrs
  975. os=-vxworks
  976. ;;
  977. sps7)
  978. basic_machine=m68k-bull
  979. os=-sysv2
  980. ;;
  981. spur)
  982. basic_machine=spur-unknown
  983. ;;
  984. st2000)
  985. basic_machine=m68k-tandem
  986. ;;
  987. stratus)
  988. basic_machine=i860-stratus
  989. os=-sysv4
  990. ;;
  991. sun2)
  992. basic_machine=m68000-sun
  993. ;;
  994. sun2os3)
  995. basic_machine=m68000-sun
  996. os=-sunos3
  997. ;;
  998. sun2os4)
  999. basic_machine=m68000-sun
  1000. os=-sunos4
  1001. ;;
  1002. sun3os3)
  1003. basic_machine=m68k-sun
  1004. os=-sunos3
  1005. ;;
  1006. sun3os4)
  1007. basic_machine=m68k-sun
  1008. os=-sunos4
  1009. ;;
  1010. sun4os3)
  1011. basic_machine=sparc-sun
  1012. os=-sunos3
  1013. ;;
  1014. sun4os4)
  1015. basic_machine=sparc-sun
  1016. os=-sunos4
  1017. ;;
  1018. sun4sol2)
  1019. basic_machine=sparc-sun
  1020. os=-solaris2
  1021. ;;
  1022. sun3 | sun3-*)
  1023. basic_machine=m68k-sun
  1024. ;;
  1025. sun4)
  1026. basic_machine=sparc-sun
  1027. ;;
  1028. sun386 | sun386i | roadrunner)
  1029. basic_machine=i386-sun
  1030. ;;
  1031. sv1)
  1032. basic_machine=sv1-cray
  1033. os=-unicos
  1034. ;;
  1035. symmetry)
  1036. basic_machine=i386-sequent
  1037. os=-dynix
  1038. ;;
  1039. t3e)
  1040. basic_machine=alphaev5-cray
  1041. os=-unicos
  1042. ;;
  1043. t90)
  1044. basic_machine=t90-cray
  1045. os=-unicos
  1046. ;;
  1047. tic54x | c54x*)
  1048. basic_machine=tic54x-unknown
  1049. os=-coff
  1050. ;;
  1051. tic55x | c55x*)
  1052. basic_machine=tic55x-unknown
  1053. os=-coff
  1054. ;;
  1055. tic6x | c6x*)
  1056. basic_machine=tic6x-unknown
  1057. os=-coff
  1058. ;;
  1059. tile*)
  1060. basic_machine=tile-unknown
  1061. os=-linux-gnu
  1062. ;;
  1063. tx39)
  1064. basic_machine=mipstx39-unknown
  1065. ;;
  1066. tx39el)
  1067. basic_machine=mipstx39el-unknown
  1068. ;;
  1069. toad1)
  1070. basic_machine=pdp10-xkl
  1071. os=-tops20
  1072. ;;
  1073. tower | tower-32)
  1074. basic_machine=m68k-ncr
  1075. ;;
  1076. tpf)
  1077. basic_machine=s390x-ibm
  1078. os=-tpf
  1079. ;;
  1080. udi29k)
  1081. basic_machine=a29k-amd
  1082. os=-udi
  1083. ;;
  1084. ultra3)
  1085. basic_machine=a29k-nyu
  1086. os=-sym1
  1087. ;;
  1088. v810 | necv810)
  1089. basic_machine=v810-nec
  1090. os=-none
  1091. ;;
  1092. vaxv)
  1093. basic_machine=vax-dec
  1094. os=-sysv
  1095. ;;
  1096. vms)
  1097. basic_machine=vax-dec
  1098. os=-vms
  1099. ;;
  1100. vpp*|vx|vx-*)
  1101. basic_machine=f301-fujitsu
  1102. ;;
  1103. vxworks960)
  1104. basic_machine=i960-wrs
  1105. os=-vxworks
  1106. ;;
  1107. vxworks68)
  1108. basic_machine=m68k-wrs
  1109. os=-vxworks
  1110. ;;
  1111. vxworks29k)
  1112. basic_machine=a29k-wrs
  1113. os=-vxworks
  1114. ;;
  1115. w65*)
  1116. basic_machine=w65-wdc
  1117. os=-none
  1118. ;;
  1119. w89k-*)
  1120. basic_machine=hppa1.1-winbond
  1121. os=-proelf
  1122. ;;
  1123. xbox)
  1124. basic_machine=i686-pc
  1125. os=-mingw32
  1126. ;;
  1127. xps | xps100)
  1128. basic_machine=xps100-honeywell
  1129. ;;
  1130. ymp)
  1131. basic_machine=ymp-cray
  1132. os=-unicos
  1133. ;;
  1134. z8k-*-coff)
  1135. basic_machine=z8k-unknown
  1136. os=-sim
  1137. ;;
  1138. z80-*-coff)
  1139. basic_machine=z80-unknown
  1140. os=-sim
  1141. ;;
  1142. none)
  1143. basic_machine=none-none
  1144. os=-none
  1145. ;;
  1146. # Here we handle the default manufacturer of certain CPU types. It is in
  1147. # some cases the only manufacturer, in others, it is the most popular.
  1148. w89k)
  1149. basic_machine=hppa1.1-winbond
  1150. ;;
  1151. op50n)
  1152. basic_machine=hppa1.1-oki
  1153. ;;
  1154. op60c)
  1155. basic_machine=hppa1.1-oki
  1156. ;;
  1157. romp)
  1158. basic_machine=romp-ibm
  1159. ;;
  1160. mmix)
  1161. basic_machine=mmix-knuth
  1162. ;;
  1163. rs6000)
  1164. basic_machine=rs6000-ibm
  1165. ;;
  1166. vax)
  1167. basic_machine=vax-dec
  1168. ;;
  1169. pdp10)
  1170. # there are many clones, so DEC is not a safe bet
  1171. basic_machine=pdp10-unknown
  1172. ;;
  1173. pdp11)
  1174. basic_machine=pdp11-dec
  1175. ;;
  1176. we32k)
  1177. basic_machine=we32k-att
  1178. ;;
  1179. sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
  1180. basic_machine=sh-unknown
  1181. ;;
  1182. sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
  1183. basic_machine=sparc-sun
  1184. ;;
  1185. cydra)
  1186. basic_machine=cydra-cydrome
  1187. ;;
  1188. orion)
  1189. basic_machine=orion-highlevel
  1190. ;;
  1191. orion105)
  1192. basic_machine=clipper-highlevel
  1193. ;;
  1194. mac | mpw | mac-mpw)
  1195. basic_machine=m68k-apple
  1196. ;;
  1197. pmac | pmac-mpw)
  1198. basic_machine=powerpc-apple
  1199. ;;
  1200. *-unknown)
  1201. # Make sure to match an already-canonicalized machine name.
  1202. ;;
  1203. *)
  1204. echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
  1205. exit 1
  1206. ;;
  1207. esac
  1208. # Here we canonicalize certain aliases for manufacturers.
  1209. case $basic_machine in
  1210. *-digital*)
  1211. basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
  1212. ;;
  1213. *-commodore*)
  1214. basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
  1215. ;;
  1216. *)
  1217. ;;
  1218. esac
  1219. # Decode manufacturer-specific aliases for certain operating systems.
  1220. if [ x"$os" != x"" ]
  1221. then
  1222. case $os in
  1223. # First match some system type aliases
  1224. # that might get confused with valid system types.
  1225. # -solaris* is a basic system type, with this one exception.
  1226. -solaris1 | -solaris1.*)
  1227. os=`echo $os | sed -e 's|solaris1|sunos4|'`
  1228. ;;
  1229. -solaris)
  1230. os=-solaris2
  1231. ;;
  1232. -svr4*)
  1233. os=-sysv4
  1234. ;;
  1235. -unixware*)
  1236. os=-sysv4.2uw
  1237. ;;
  1238. -gnu/linux*)
  1239. os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
  1240. ;;
  1241. # First accept the basic system types.
  1242. # The portable systems comes first.
  1243. # Each alternative MUST END IN A *, to match a version number.
  1244. # -sysv* is not here because it comes later, after sysvr4.
  1245. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
  1246. | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
  1247. | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
  1248. | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
  1249. | -aos* \
  1250. | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
  1251. | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
  1252. | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
  1253. | -openbsd* | -solidbsd* \
  1254. | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
  1255. | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
  1256. | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
  1257. | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
  1258. | -chorusos* | -chorusrdb* | -cegcc* \
  1259. | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
  1260. | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
  1261. | -uxpv* | -beos* | -mpeix* | -udk* \
  1262. | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
  1263. | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
  1264. | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
  1265. | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
  1266. | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
  1267. | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
  1268. | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -irx*)
  1269. # Remember, each alternative MUST END IN *, to match a version number.
  1270. ;;
  1271. -qnx*)
  1272. case $basic_machine in
  1273. x86-* | i*86-*)
  1274. ;;
  1275. *)
  1276. os=-nto$os
  1277. ;;
  1278. esac
  1279. ;;
  1280. -nto-qnx*)
  1281. ;;
  1282. -nto*)
  1283. os=`echo $os | sed -e 's|nto|nto-qnx|'`
  1284. ;;
  1285. -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
  1286. | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
  1287. | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
  1288. ;;
  1289. -mac*)
  1290. os=`echo $os | sed -e 's|mac|macos|'`
  1291. ;;
  1292. -linux-dietlibc)
  1293. os=-linux-dietlibc
  1294. ;;
  1295. -linux*)
  1296. os=`echo $os | sed -e 's|linux|linux-gnu|'`
  1297. ;;
  1298. -sunos5*)
  1299. os=`echo $os | sed -e 's|sunos5|solaris2|'`
  1300. ;;
  1301. -sunos6*)
  1302. os=`echo $os | sed -e 's|sunos6|solaris3|'`
  1303. ;;
  1304. -opened*)
  1305. os=-openedition
  1306. ;;
  1307. -os400*)
  1308. os=-os400
  1309. ;;
  1310. -wince*)
  1311. os=-wince
  1312. ;;
  1313. -osfrose*)
  1314. os=-osfrose
  1315. ;;
  1316. -osf*)
  1317. os=-osf
  1318. ;;
  1319. -utek*)
  1320. os=-bsd
  1321. ;;
  1322. -dynix*)
  1323. os=-bsd
  1324. ;;
  1325. -acis*)
  1326. os=-aos
  1327. ;;
  1328. -atheos*)
  1329. os=-atheos
  1330. ;;
  1331. -syllable*)
  1332. os=-syllable
  1333. ;;
  1334. -386bsd)
  1335. os=-bsd
  1336. ;;
  1337. -ctix* | -uts*)
  1338. os=-sysv
  1339. ;;
  1340. -nova*)
  1341. os=-rtmk-nova
  1342. ;;
  1343. -ns2 )
  1344. os=-nextstep2
  1345. ;;
  1346. -nsk*)
  1347. os=-nsk
  1348. ;;
  1349. # Preserve the version number of sinix5.
  1350. -sinix5.*)
  1351. os=`echo $os | sed -e 's|sinix|sysv|'`
  1352. ;;
  1353. -sinix*)
  1354. os=-sysv4
  1355. ;;
  1356. -tpf*)
  1357. os=-tpf
  1358. ;;
  1359. -triton*)
  1360. os=-sysv3
  1361. ;;
  1362. -oss*)
  1363. os=-sysv3
  1364. ;;
  1365. -svr4)
  1366. os=-sysv4
  1367. ;;
  1368. -svr3)
  1369. os=-sysv3
  1370. ;;
  1371. -sysvr4)
  1372. os=-sysv4
  1373. ;;
  1374. # This must come after -sysvr4.
  1375. -sysv*)
  1376. ;;
  1377. -ose*)
  1378. os=-ose
  1379. ;;
  1380. -es1800*)
  1381. os=-ose
  1382. ;;
  1383. -xenix)
  1384. os=-xenix
  1385. ;;
  1386. -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
  1387. os=-mint
  1388. ;;
  1389. -aros*)
  1390. os=-aros
  1391. ;;
  1392. -kaos*)
  1393. os=-kaos
  1394. ;;
  1395. -zvmoe)
  1396. os=-zvmoe
  1397. ;;
  1398. -dicos*)
  1399. os=-dicos
  1400. ;;
  1401. -none)
  1402. ;;
  1403. *)
  1404. # Get rid of the `-' at the beginning of $os.
  1405. os=`echo $os | sed 's/[^-]*-//'`
  1406. echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
  1407. exit 1
  1408. ;;
  1409. esac
  1410. else
  1411. # Here we handle the default operating systems that come with various machines.
  1412. # The value should be what the vendor currently ships out the door with their
  1413. # machine or put another way, the most popular os provided with the machine.
  1414. # Note that if you're going to try to match "-MANUFACTURER" here (say,
  1415. # "-sun"), then you have to tell the case statement up towards the top
  1416. # that MANUFACTURER isn't an operating system. Otherwise, code above
  1417. # will signal an error saying that MANUFACTURER isn't an operating
  1418. # system, and we'll never get to this point.
  1419. case $basic_machine in
  1420. score-*)
  1421. os=-elf
  1422. ;;
  1423. spu-*)
  1424. os=-elf
  1425. ;;
  1426. *-acorn)
  1427. os=-riscix1.2
  1428. ;;
  1429. arm*-rebel)
  1430. os=-linux
  1431. ;;
  1432. arm*-semi)
  1433. os=-aout
  1434. ;;
  1435. c4x-* | tic4x-*)
  1436. os=-coff
  1437. ;;
  1438. # This must come before the *-dec entry.
  1439. pdp10-*)
  1440. os=-tops20
  1441. ;;
  1442. pdp11-*)
  1443. os=-none
  1444. ;;
  1445. *-dec | vax-*)
  1446. os=-ultrix4.2
  1447. ;;
  1448. m68*-apollo)
  1449. os=-domain
  1450. ;;
  1451. i386-sun)
  1452. os=-sunos4.0.2
  1453. ;;
  1454. m68000-sun)
  1455. os=-sunos3
  1456. # This also exists in the configure program, but was not the
  1457. # default.
  1458. # os=-sunos4
  1459. ;;
  1460. m68*-cisco)
  1461. os=-aout
  1462. ;;
  1463. mep-*)
  1464. os=-elf
  1465. ;;
  1466. mips*-cisco)
  1467. os=-elf
  1468. ;;
  1469. mips*-*)
  1470. os=-elf
  1471. ;;
  1472. or32-*)
  1473. os=-coff
  1474. ;;
  1475. *-tti) # must be before sparc entry or we get the wrong os.
  1476. os=-sysv3
  1477. ;;
  1478. sparc-* | *-sun)
  1479. os=-sunos4.1.1
  1480. ;;
  1481. *-be)
  1482. os=-beos
  1483. ;;
  1484. *-haiku)
  1485. os=-haiku
  1486. ;;
  1487. *-ibm)
  1488. os=-aix
  1489. ;;
  1490. *-knuth)
  1491. os=-mmixware
  1492. ;;
  1493. *-wec)
  1494. os=-proelf
  1495. ;;
  1496. *-winbond)
  1497. os=-proelf
  1498. ;;
  1499. *-oki)
  1500. os=-proelf
  1501. ;;
  1502. *-hp)
  1503. os=-hpux
  1504. ;;
  1505. *-hitachi)
  1506. os=-hiux
  1507. ;;
  1508. i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
  1509. os=-sysv
  1510. ;;
  1511. *-cbm)
  1512. os=-amigaos
  1513. ;;
  1514. *-dg)
  1515. os=-dgux
  1516. ;;
  1517. *-dolphin)
  1518. os=-sysv3
  1519. ;;
  1520. m68k-ccur)
  1521. os=-rtu
  1522. ;;
  1523. m88k-omron*)
  1524. os=-luna
  1525. ;;
  1526. *-next )
  1527. os=-nextstep
  1528. ;;
  1529. *-sequent)
  1530. os=-ptx
  1531. ;;
  1532. *-crds)
  1533. os=-unos
  1534. ;;
  1535. *-ns)
  1536. os=-genix
  1537. ;;
  1538. i370-*)
  1539. os=-mvs
  1540. ;;
  1541. *-next)
  1542. os=-nextstep3
  1543. ;;
  1544. *-gould)
  1545. os=-sysv
  1546. ;;
  1547. *-highlevel)
  1548. os=-bsd
  1549. ;;
  1550. *-encore)
  1551. os=-bsd
  1552. ;;
  1553. *-sgi)
  1554. os=-irix
  1555. ;;
  1556. *-siemens)
  1557. os=-sysv4
  1558. ;;
  1559. *-masscomp)
  1560. os=-rtu
  1561. ;;
  1562. f30[01]-fujitsu | f700-fujitsu)
  1563. os=-uxpv
  1564. ;;
  1565. *-rom68k)
  1566. os=-coff
  1567. ;;
  1568. *-*bug)
  1569. os=-coff
  1570. ;;
  1571. *-apple)
  1572. os=-macos
  1573. ;;
  1574. *-atari*)
  1575. os=-mint
  1576. ;;
  1577. *)
  1578. os=-none
  1579. ;;
  1580. esac
  1581. fi
  1582. # Here we handle the case where we know the os, and the CPU type, but not the
  1583. # manufacturer. We pick the logical manufacturer.
  1584. vendor=unknown
  1585. case $basic_machine in
  1586. *-unknown)
  1587. case $os in
  1588. -riscix*)
  1589. vendor=acorn
  1590. ;;
  1591. -sunos*)
  1592. vendor=sun
  1593. ;;
  1594. -aix*)
  1595. vendor=ibm
  1596. ;;
  1597. -beos*)
  1598. vendor=be
  1599. ;;
  1600. -hpux*)
  1601. vendor=hp
  1602. ;;
  1603. -mpeix*)
  1604. vendor=hp
  1605. ;;
  1606. -hiux*)
  1607. vendor=hitachi
  1608. ;;
  1609. -unos*)
  1610. vendor=crds
  1611. ;;
  1612. -dgux*)
  1613. vendor=dg
  1614. ;;
  1615. -luna*)
  1616. vendor=omron
  1617. ;;
  1618. -genix*)
  1619. vendor=ns
  1620. ;;
  1621. -mvs* | -opened*)
  1622. vendor=ibm
  1623. ;;
  1624. -os400*)
  1625. vendor=ibm
  1626. ;;
  1627. -ptx*)
  1628. vendor=sequent
  1629. ;;
  1630. -tpf*)
  1631. vendor=ibm
  1632. ;;
  1633. -vxsim* | -vxworks* | -windiss*)
  1634. vendor=wrs
  1635. ;;
  1636. -aux*)
  1637. vendor=apple
  1638. ;;
  1639. -hms*)
  1640. vendor=hitachi
  1641. ;;
  1642. -mpw* | -macos*)
  1643. vendor=apple
  1644. ;;
  1645. -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
  1646. vendor=atari
  1647. ;;
  1648. -vos*)
  1649. vendor=stratus
  1650. ;;
  1651. esac
  1652. basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
  1653. ;;
  1654. esac
  1655. echo $basic_machine$os
  1656. exit
  1657. # Local variables:
  1658. # eval: (add-hook 'write-file-hooks 'time-stamp)
  1659. # time-stamp-start: "timestamp='"
  1660. # time-stamp-format: "%:y-%02m-%02d"
  1661. # time-stamp-end: "'"
  1662. # End: