1
0

config.sub 33 KB

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