config.sub 33 KB

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