config.sub 31 KB

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