config.sub 34 KB

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