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.

1268 lines
25 KiB

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