config.sub 33 KB

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