config.sub 33 KB

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