config.sub 34 KB

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