/js/src/build/autoconf/config.sub

http://github.com/zpao/v8monkey · Shell · 1708 lines · 1572 code · 28 blank · 108 comment · 4 complexity · e08d0ec1426d697c9d1f77ef1f61975d MD5 · raw file

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