You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1714 lines
34 KiB

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