config.sub 32 KB

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