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.

1417 lines
28 KiB

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