config.sub 32 KB

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