config.sub 33 KB

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