config.sub 31 KB

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