config.sub 32 KB

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