config.sub
上传用户:aoeyumen
上传日期:2007-01-06
资源大小:3329k
文件大小:19k
源码类别:

DVD

开发平台:

Unix_Linux

  1. #! /bin/sh
  2. # Configuration validation subroutine script, version 1.1.
  3. #   Copyright (C) 1991, 92-97, 1998 Free Software Foundation, Inc.
  4. # This file is (in principle) common to ALL GNU software.
  5. # The presence of a machine in this file suggests that SOME GNU software
  6. # can handle that machine.  It does not imply ALL GNU software can.
  7. #
  8. # This file is free software; you can redistribute it and/or modify
  9. # it under the terms of the GNU General Public License as published by
  10. # the Free Software Foundation; either version 2 of the License, or
  11. # (at your option) any later version.
  12. #
  13. # This program is distributed in the hope that it will be useful,
  14. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. # GNU General Public License for more details.
  17. #
  18. # You should have received a copy of the GNU General Public License
  19. # along with this program; if not, write to the Free Software
  20. # Foundation, Inc., 59 Temple Place - Suite 330,
  21. # Boston, MA 02111-1307, USA.
  22. # As a special exception to the GNU General Public License, if you
  23. # distribute this file as part of a program that contains a
  24. # configuration script generated by Autoconf, you may include it under
  25. # the same distribution terms that you use for the rest of that program.
  26. # Configuration subroutine to validate and canonicalize a configuration type.
  27. # Supply the specified configuration type as an argument.
  28. # If it is invalid, we print an error message on stderr and exit with code 1.
  29. # Otherwise, we print the canonical config type on stdout and succeed.
  30. # This file is supposed to be the same for all GNU packages
  31. # and recognize all the CPU types, system types and aliases
  32. # that are meaningful with *any* GNU software.
  33. # Each package is responsible for reporting which valid configurations
  34. # it does not support.  The user should be able to distinguish
  35. # a failure to support a valid configuration from a meaningless
  36. # configuration.
  37. # The goal of this file is to map all the various variations of a given
  38. # machine specification into a single specification in the form:
  39. # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
  40. # or in some cases, the newer four-part form:
  41. # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
  42. # It is wrong to echo any other type of specification.
  43. if [ x$1 = x ]
  44. then
  45. echo Configuration name missing. 1>&2
  46. echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
  47. echo "or     $0 ALIAS" 1>&2
  48. echo where ALIAS is a recognized configuration type. 1>&2
  49. exit 1
  50. fi
  51. # First pass through any local machine types.
  52. case $1 in
  53. *local*)
  54. echo $1
  55. exit 0
  56. ;;
  57. *)
  58. ;;
  59. esac
  60. # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
  61. # Here we must recognize all the valid KERNEL-OS combinations.
  62. maybe_os=`echo $1 | sed 's/^(.*)-([^-]*-[^-]*)$/2/'`
  63. case $maybe_os in
  64.   linux-gnu*)
  65.     os=-$maybe_os
  66.     basic_machine=`echo $1 | sed 's/^(.*)-([^-]*-[^-]*)$/1/'`
  67.     ;;
  68.   *)
  69.     basic_machine=`echo $1 | sed 's/-[^-]*$//'`
  70.     if [ $basic_machine != $1 ]
  71.     then os=`echo $1 | sed 's/.*-/-/'`
  72.     else os=; fi
  73.     ;;
  74. esac
  75. ### Let's recognize common machines as not being operating systems so
  76. ### that things like config.sub decstation-3100 work.  We also
  77. ### recognize some manufacturers as not being operating systems, so we
  78. ### can provide default operating systems below.
  79. case $os in
  80. -sun*os*)
  81. # Prevent following clause from handling this invalid input.
  82. ;;
  83. -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | 
  84. -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | 
  85. -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | 
  86. -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |
  87. -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | 
  88. -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | 
  89. -apple)
  90. os=
  91. basic_machine=$1
  92. ;;
  93. -hiux*)
  94. os=-hiuxwe2
  95. ;;
  96. -sco5)
  97. os=sco3.2v5
  98. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  99. ;;
  100. -sco4)
  101. os=-sco3.2v4
  102. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  103. ;;
  104. -sco3.2.[4-9]*)
  105. os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
  106. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  107. ;;
  108. -sco3.2v[4-9]*)
  109. # Don't forget version if it is 3.2v4 or newer.
  110. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  111. ;;
  112. -sco*)
  113. os=-sco3.2v2
  114. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  115. ;;
  116. -isc)
  117. os=-isc2.2
  118. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  119. ;;
  120. -clix*)
  121. basic_machine=clipper-intergraph
  122. ;;
  123. -isc*)
  124. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
  125. ;;
  126. -lynx*)
  127. os=-lynxos
  128. ;;
  129. -ptx*)
  130. basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
  131. ;;
  132. -windowsnt*)
  133. os=`echo $os | sed -e 's/windowsnt/winnt/'`
  134. ;;
  135. -psos*)
  136. os=-psos
  137. ;;
  138. esac
  139. # Decode aliases for certain CPU-COMPANY combinations.
  140. case $basic_machine in
  141. # Recognize the basic CPU types without company name.
  142. # Some are omitted here because they have special meanings below.
  143. tahoe | i860 | m32r | m68k | m68000 | m88k | ns32k | arc | arm 
  144. | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k 
  145. | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 | hppa2.0 
  146. | alpha | alphaev5 | alphaev56 | we32k | ns16k | clipper 
  147. | i370 | sh | powerpc | powerpcle | 1750a | dsp16xx | pdp11 
  148. | mips64 | mipsel | mips64el | mips64orion | mips64orionel 
  149. | mipstx39 | mipstx39el | armv[34][lb] 
  150. | sparc | sparclet | sparclite | sparc64 | v850)
  151. basic_machine=$basic_machine-unknown
  152. ;;
  153. # We use `pc' rather than `unknown'
  154. # because (1) that's what they normally are, and
  155. # (2) the word "unknown" tends to confuse beginning users.
  156. i[34567]86)
  157.   basic_machine=$basic_machine-pc
  158.   ;;
  159. # Object if more than one company name word.
  160. *-*-*)
  161. echo Invalid configuration `$1': machine `$basic_machine' not recognized 1>&2
  162. exit 1
  163. ;;
  164. # Recognize the basic CPU types with company name.
  165. vax-* | tahoe-* | i[34567]86-* | i860-* | m32r-* | m68k-* | m68000-* 
  166.       | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* 
  167.       | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* 
  168.       | power-* | none-* | 580-* | cray2-* | h8300-* | i960-* 
  169.       | xmp-* | ymp-* | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* 
  170.       | alpha-* | alphaev5-* | alphaev56-* | we32k-* | cydra-* 
  171.       | ns16k-* | pn-* | np1-* | xps100-* | clipper-* | orion-* 
  172.       | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* 
  173.       | sparc64-* | mips64-* | mipsel-* | armv[34][lb]-*
  174.       | mips64el-* | mips64orion-* | mips64orionel-*  
  175.       | mipstx39-* | mipstx39el-* 
  176.       | f301-*)
  177. ;;
  178. # Recognize the various machine names and aliases which stand
  179. # for a CPU type and a company and sometimes even an OS.
  180. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
  181. basic_machine=m68000-att
  182. ;;
  183. 3b*)
  184. basic_machine=we32k-att
  185. ;;
  186. alliant | fx80)
  187. basic_machine=fx80-alliant
  188. ;;
  189. altos | altos3068)
  190. basic_machine=m68k-altos
  191. ;;
  192. am29k)
  193. basic_machine=a29k-none
  194. os=-bsd
  195. ;;
  196. amdahl)
  197. basic_machine=580-amdahl
  198. os=-sysv
  199. ;;
  200. amiga | amiga-*)
  201. basic_machine=m68k-cbm
  202. ;;
  203. amigaos | amigados)
  204. basic_machine=m68k-cbm
  205. os=-amigaos
  206. ;;
  207. amigaunix | amix)
  208. basic_machine=m68k-cbm
  209. os=-sysv4
  210. ;;
  211. apollo68)
  212. basic_machine=m68k-apollo
  213. os=-sysv
  214. ;;
  215. aux)
  216. basic_machine=m68k-apple
  217. os=-aux
  218. ;;
  219. balance)
  220. basic_machine=ns32k-sequent
  221. os=-dynix
  222. ;;
  223. convex-c1)
  224. basic_machine=c1-convex
  225. os=-bsd
  226. ;;
  227. convex-c2)
  228. basic_machine=c2-convex
  229. os=-bsd
  230. ;;
  231. convex-c32)
  232. basic_machine=c32-convex
  233. os=-bsd
  234. ;;
  235. convex-c34)
  236. basic_machine=c34-convex
  237. os=-bsd
  238. ;;
  239. convex-c38)
  240. basic_machine=c38-convex
  241. os=-bsd
  242. ;;
  243. cray | ymp)
  244. basic_machine=ymp-cray
  245. os=-unicos
  246. ;;
  247. cray2)
  248. basic_machine=cray2-cray
  249. os=-unicos
  250. ;;
  251. [ctj]90-cray)
  252. basic_machine=c90-cray
  253. os=-unicos
  254. ;;
  255. crds | unos)
  256. basic_machine=m68k-crds
  257. ;;
  258. da30 | da30-*)
  259. basic_machine=m68k-da30
  260. ;;
  261. decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
  262. basic_machine=mips-dec
  263. ;;
  264. delta | 3300 | motorola-3300 | motorola-delta 
  265.       | 3300-motorola | delta-motorola)
  266. basic_machine=m68k-motorola
  267. ;;
  268. delta88)
  269. basic_machine=m88k-motorola
  270. os=-sysv3
  271. ;;
  272. dpx20 | dpx20-*)
  273. basic_machine=rs6000-bull
  274. os=-bosx
  275. ;;
  276. dpx2* | dpx2*-bull)
  277. basic_machine=m68k-bull
  278. os=-sysv3
  279. ;;
  280. ebmon29k)
  281. basic_machine=a29k-amd
  282. os=-ebmon
  283. ;;
  284. elxsi)
  285. basic_machine=elxsi-elxsi
  286. os=-bsd
  287. ;;
  288. encore | umax | mmax)
  289. basic_machine=ns32k-encore
  290. ;;
  291. fx2800)
  292. basic_machine=i860-alliant
  293. ;;
  294. genix)
  295. basic_machine=ns32k-ns
  296. ;;
  297. gmicro)
  298. basic_machine=tron-gmicro
  299. os=-sysv
  300. ;;
  301. h3050r* | hiux*)
  302. basic_machine=hppa1.1-hitachi
  303. os=-hiuxwe2
  304. ;;
  305. h8300hms)
  306. basic_machine=h8300-hitachi
  307. os=-hms
  308. ;;
  309. harris)
  310. basic_machine=m88k-harris
  311. os=-sysv3
  312. ;;
  313. hp300-*)
  314. basic_machine=m68k-hp
  315. ;;
  316. hp300bsd)
  317. basic_machine=m68k-hp
  318. os=-bsd
  319. ;;
  320. hp300hpux)
  321. basic_machine=m68k-hp
  322. os=-hpux
  323. ;;
  324. hp9k2[0-9][0-9] | hp9k31[0-9])
  325. basic_machine=m68000-hp
  326. ;;
  327. hp9k3[2-9][0-9])
  328. basic_machine=m68k-hp
  329. ;;
  330. hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
  331. basic_machine=hppa1.1-hp
  332. ;;
  333. hp9k8[0-9][0-9] | hp8[0-9][0-9])
  334. basic_machine=hppa1.0-hp
  335. ;;
  336. hppa-next)
  337. os=-nextstep3
  338. ;;
  339. i370-ibm* | ibm*)
  340. basic_machine=i370-ibm
  341. os=-mvs
  342. ;;
  343. # I'm not sure what "Sysv32" means.  Should this be sysv3.2?
  344. i[34567]86v32)
  345. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  346. os=-sysv32
  347. ;;
  348. i[34567]86v4*)
  349. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  350. os=-sysv4
  351. ;;
  352. i[34567]86v)
  353. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  354. os=-sysv
  355. ;;
  356. i[34567]86sol2)
  357. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  358. os=-solaris2
  359. ;;
  360. iris | iris4d)
  361. basic_machine=mips-sgi
  362. case $os in
  363.     -irix*)
  364. ;;
  365.     *)
  366. os=-irix4
  367. ;;
  368. esac
  369. ;;
  370. isi68 | isi)
  371. basic_machine=m68k-isi
  372. os=-sysv
  373. ;;
  374. m88k-omron*)
  375. basic_machine=m88k-omron
  376. ;;
  377. magnum | m3230)
  378. basic_machine=mips-mips
  379. os=-sysv
  380. ;;
  381. merlin)
  382. basic_machine=ns32k-utek
  383. os=-sysv
  384. ;;
  385. miniframe)
  386. basic_machine=m68000-convergent
  387. ;;
  388. mipsel*-linux*)
  389. basic_machine=mipsel-unknown
  390. os=-linux-gnu
  391. ;;
  392. mips*-linux*)
  393. basic_machine=mips-unknown
  394. os=-linux-gnu
  395. ;;
  396. mips3*-*)
  397. basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
  398. ;;
  399. mips3*)
  400. basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
  401. ;;
  402. ncr3000)
  403. basic_machine=i486-ncr
  404. os=-sysv4
  405. ;;
  406. news | news700 | news800 | news900)
  407. basic_machine=m68k-sony
  408. os=-newsos
  409. ;;
  410. news1000)
  411. basic_machine=m68030-sony
  412. os=-newsos
  413. ;;
  414. news-3600 | risc-news)
  415. basic_machine=mips-sony
  416. os=-newsos
  417. ;;
  418. next | m*-next )
  419. basic_machine=m68k-next
  420. case $os in
  421.     -nextstep* )
  422. ;;
  423.     -ns2*)
  424.       os=-nextstep2
  425. ;;
  426.     *)
  427.       os=-nextstep3
  428. ;;
  429. esac
  430. ;;
  431. nh3000)
  432. basic_machine=m68k-harris
  433. os=-cxux
  434. ;;
  435. nh[45]000)
  436. basic_machine=m88k-harris
  437. os=-cxux
  438. ;;
  439. nindy960)
  440. basic_machine=i960-intel
  441. os=-nindy
  442. ;;
  443. np1)
  444. basic_machine=np1-gould
  445. ;;
  446. pa-hitachi)
  447. basic_machine=hppa1.1-hitachi
  448. os=-hiuxwe2
  449. ;;
  450. paragon)
  451. basic_machine=i860-intel
  452. os=-osf
  453. ;;
  454. pbd)
  455. basic_machine=sparc-tti
  456. ;;
  457. pbb)
  458. basic_machine=m68k-tti
  459. ;;
  460.         pc532 | pc532-*)
  461. basic_machine=ns32k-pc532
  462. ;;
  463. pentium | p5 | k5 | nexen)
  464. basic_machine=i586-pc
  465. ;;
  466. pentiumpro | p6 | k6 | 6x86)
  467. basic_machine=i686-pc
  468. ;;
  469. pentiumii | pentium2)
  470. basic_machine=i786-pc
  471. ;;
  472. pentium-* | p5-* | k5-* | nexen-*)
  473. basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
  474. ;;
  475. pentiumpro-* | p6-* | k6-* | 6x86-*)
  476. basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
  477. ;;
  478. pentiumii-* | pentium2-*)
  479. basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
  480. ;;
  481. pn)
  482. basic_machine=pn-gould
  483. ;;
  484. power) basic_machine=rs6000-ibm
  485. ;;
  486. ppc) basic_machine=powerpc-unknown
  487.         ;;
  488. ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
  489. ;;
  490. ppcle | powerpclittle | ppc-le | powerpc-little)
  491. basic_machine=powerpcle-unknown
  492.         ;;
  493. ppcle-* | powerpclittle-*)
  494. basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
  495. ;;
  496. ps2)
  497. basic_machine=i386-ibm
  498. ;;
  499. rm[46]00)
  500. basic_machine=mips-siemens
  501. ;;
  502. rtpc | rtpc-*)
  503. basic_machine=romp-ibm
  504. ;;
  505. sequent)
  506. basic_machine=i386-sequent
  507. ;;
  508. sh)
  509. basic_machine=sh-hitachi
  510. os=-hms
  511. ;;
  512. sps7)
  513. basic_machine=m68k-bull
  514. os=-sysv2
  515. ;;
  516. spur)
  517. basic_machine=spur-unknown
  518. ;;
  519. sun2)
  520. basic_machine=m68000-sun
  521. ;;
  522. sun2os3)
  523. basic_machine=m68000-sun
  524. os=-sunos3
  525. ;;
  526. sun2os4)
  527. basic_machine=m68000-sun
  528. os=-sunos4
  529. ;;
  530. sun3os3)
  531. basic_machine=m68k-sun
  532. os=-sunos3
  533. ;;
  534. sun3os4)
  535. basic_machine=m68k-sun
  536. os=-sunos4
  537. ;;
  538. sun4os3)
  539. basic_machine=sparc-sun
  540. os=-sunos3
  541. ;;
  542. sun4os4)
  543. basic_machine=sparc-sun
  544. os=-sunos4
  545. ;;
  546. sun4sol2)
  547. basic_machine=sparc-sun
  548. os=-solaris2
  549. ;;
  550. sun3 | sun3-*)
  551. basic_machine=m68k-sun
  552. ;;
  553. sun4)
  554. basic_machine=sparc-sun
  555. ;;
  556. sun386 | sun386i | roadrunner)
  557. basic_machine=i386-sun
  558. ;;
  559. symmetry)
  560. basic_machine=i386-sequent
  561. os=-dynix
  562. ;;
  563. tx39)
  564. basic_machine=mipstx39-unknown
  565. ;;
  566. tx39el)
  567. basic_machine=mipstx39el-unknown
  568. ;;
  569. tower | tower-32)
  570. basic_machine=m68k-ncr
  571. ;;
  572. udi29k)
  573. basic_machine=a29k-amd
  574. os=-udi
  575. ;;
  576. ultra3)
  577. basic_machine=a29k-nyu
  578. os=-sym1
  579. ;;
  580. vaxv)
  581. basic_machine=vax-dec
  582. os=-sysv
  583. ;;
  584. vms)
  585. basic_machine=vax-dec
  586. os=-vms
  587. ;;
  588. vpp*|vx|vx-*)
  589.                basic_machine=f301-fujitsu
  590.                ;;
  591. vxworks960)
  592. basic_machine=i960-wrs
  593. os=-vxworks
  594. ;;
  595. vxworks68)
  596. basic_machine=m68k-wrs
  597. os=-vxworks
  598. ;;
  599. vxworks29k)
  600. basic_machine=a29k-wrs
  601. os=-vxworks
  602. ;;
  603. xmp)
  604. basic_machine=xmp-cray
  605. os=-unicos
  606. ;;
  607.         xps | xps100)
  608. basic_machine=xps100-honeywell
  609. ;;
  610. none)
  611. basic_machine=none-none
  612. os=-none
  613. ;;
  614. # Here we handle the default manufacturer of certain CPU types.  It is in
  615. # some cases the only manufacturer, in others, it is the most popular.
  616. mips)
  617. if [ x$os = x-linux-gnu ]; then
  618. basic_machine=mips-unknown
  619. else
  620. basic_machine=mips-mips
  621. fi
  622. ;;
  623. romp)
  624. basic_machine=romp-ibm
  625. ;;
  626. rs6000)
  627. basic_machine=rs6000-ibm
  628. ;;
  629. vax)
  630. basic_machine=vax-dec
  631. ;;
  632. pdp11)
  633. basic_machine=pdp11-dec
  634. ;;
  635. we32k)
  636. basic_machine=we32k-att
  637. ;;
  638. sparc)
  639. basic_machine=sparc-sun
  640. ;;
  641.         cydra)
  642. basic_machine=cydra-cydrome
  643. ;;
  644. orion)
  645. basic_machine=orion-highlevel
  646. ;;
  647. orion105)
  648. basic_machine=clipper-highlevel
  649. ;;
  650. *)
  651. echo Invalid configuration `$1': machine `$basic_machine' not recognized 1>&2
  652. exit 1
  653. ;;
  654. esac
  655. # Here we canonicalize certain aliases for manufacturers.
  656. case $basic_machine in
  657. *-digital*)
  658. basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
  659. ;;
  660. *-commodore*)
  661. basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
  662. ;;
  663. *)
  664. ;;
  665. esac
  666. # Decode manufacturer-specific aliases for certain operating systems.
  667. if [ x"$os" != x"" ]
  668. then
  669. case $os in
  670.         # First match some system type aliases
  671.         # that might get confused with valid system types.
  672. # -solaris* is a basic system type, with this one exception.
  673. -solaris1 | -solaris1.*)
  674. os=`echo $os | sed -e 's|solaris1|sunos4|'`
  675. ;;
  676. -solaris)
  677. os=-solaris2
  678. ;;
  679. -svr4*)
  680. os=-sysv4
  681. ;;
  682. -unixware*)
  683. os=-sysv4.2uw
  684. ;;
  685. -gnu/linux*)
  686. os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
  687. ;;
  688. # First accept the basic system types.
  689. # The portable systems comes first.
  690. # Each alternative MUST END IN A *, to match a version number.
  691. # -sysv* is not here because it comes later, after sysvr4.
  692. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* 
  693.       | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*
  694.       | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* 
  695.       | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* 
  696.       | -aos* 
  697.       | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* 
  698.       | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* 
  699.       | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* 
  700.       | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* 
  701.       | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* 
  702.       | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* 
  703.       | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* 
  704.       | -mingw32* | -linux-gnu* | -uxpv* | -beos*)
  705. # Remember, each alternative MUST END IN *, to match a version number.
  706. ;;
  707. -linux*)
  708. os=`echo $os | sed -e 's|linux|linux-gnu|'`
  709. ;;
  710. -sunos5*)
  711. os=`echo $os | sed -e 's|sunos5|solaris2|'`
  712. ;;
  713. -sunos6*)
  714. os=`echo $os | sed -e 's|sunos6|solaris3|'`
  715. ;;
  716. -osfrose*)
  717. os=-osfrose
  718. ;;
  719. -osf*)
  720. os=-osf
  721. ;;
  722. -utek*)
  723. os=-bsd
  724. ;;
  725. -dynix*)
  726. os=-bsd
  727. ;;
  728. -acis*)
  729. os=-aos
  730. ;;
  731. -ctix* | -uts*)
  732. os=-sysv
  733. ;;
  734. -ns2 )
  735.         os=-nextstep2
  736. ;;
  737. # Preserve the version number of sinix5.
  738. -sinix5.*)
  739. os=`echo $os | sed -e 's|sinix|sysv|'`
  740. ;;
  741. -sinix*)
  742. os=-sysv4
  743. ;;
  744. -triton*)
  745. os=-sysv3
  746. ;;
  747. -oss*)
  748. os=-sysv3
  749. ;;
  750. -svr4)
  751. os=-sysv4
  752. ;;
  753. -svr3)
  754. os=-sysv3
  755. ;;
  756. -sysvr4)
  757. os=-sysv4
  758. ;;
  759. # This must come after -sysvr4.
  760. -sysv*)
  761. ;;
  762. -xenix)
  763. os=-xenix
  764. ;;
  765. -none)
  766. ;;
  767. *)
  768. # Get rid of the `-' at the beginning of $os.
  769. os=`echo $os | sed 's/[^-]*-//'`
  770. echo Invalid configuration `$1': system `$os' not recognized 1>&2
  771. exit 1
  772. ;;
  773. esac
  774. else
  775. # Here we handle the default operating systems that come with various machines.
  776. # The value should be what the vendor currently ships out the door with their
  777. # machine or put another way, the most popular os provided with the machine.
  778. # Note that if you're going to try to match "-MANUFACTURER" here (say,
  779. # "-sun"), then you have to tell the case statement up towards the top
  780. # that MANUFACTURER isn't an operating system.  Otherwise, code above
  781. # will signal an error saying that MANUFACTURER isn't an operating
  782. # system, and we'll never get to this point.
  783. case $basic_machine in
  784. *-acorn)
  785. os=-riscix1.2
  786. ;;
  787. arm*-semi)
  788. os=-aout
  789. ;;
  790.         pdp11-*)
  791. os=-none
  792. ;;
  793. *-dec | vax-*)
  794. os=-ultrix4.2
  795. ;;
  796. m68*-apollo)
  797. os=-domain
  798. ;;
  799. i386-sun)
  800. os=-sunos4.0.2
  801. ;;
  802. m68000-sun)
  803. os=-sunos3
  804. # This also exists in the configure program, but was not the
  805. # default.
  806. # os=-sunos4
  807. ;;
  808. *-tti) # must be before sparc entry or we get the wrong os.
  809. os=-sysv3
  810. ;;
  811. sparc-* | *-sun)
  812. os=-sunos4.1.1
  813. ;;
  814. *-be)
  815. os=-beos
  816. ;;
  817. *-ibm)
  818. os=-aix
  819. ;;
  820. *-hp)
  821. os=-hpux
  822. ;;
  823. *-hitachi)
  824. os=-hiux
  825. ;;
  826. i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
  827. os=-sysv
  828. ;;
  829. *-cbm)
  830. os=-amigaos
  831. ;;
  832. *-dg)
  833. os=-dgux
  834. ;;
  835. *-dolphin)
  836. os=-sysv3
  837. ;;
  838. m68k-ccur)
  839. os=-rtu
  840. ;;
  841. m88k-omron*)
  842. os=-luna
  843. ;;
  844. *-next )
  845. os=-nextstep
  846. ;;
  847. *-sequent)
  848. os=-ptx
  849. ;;
  850. *-crds)
  851. os=-unos
  852. ;;
  853. *-ns)
  854. os=-genix
  855. ;;
  856. i370-*)
  857. os=-mvs
  858. ;;
  859. *-next)
  860. os=-nextstep3
  861. ;;
  862.         *-gould)
  863. os=-sysv
  864. ;;
  865.         *-highlevel)
  866. os=-bsd
  867. ;;
  868. *-encore)
  869. os=-bsd
  870. ;;
  871.         *-sgi)
  872. os=-irix
  873. ;;
  874.         *-siemens)
  875. os=-sysv4
  876. ;;
  877. *-masscomp)
  878. os=-rtu
  879. ;;
  880. f301-fujitsu)
  881. os=-uxpv
  882. ;;
  883. *)
  884. os=-none
  885. ;;
  886. esac
  887. fi
  888. # Here we handle the case where we know the os, and the CPU type, but not the
  889. # manufacturer.  We pick the logical manufacturer.
  890. vendor=unknown
  891. case $basic_machine in
  892. *-unknown)
  893. case $os in
  894. -riscix*)
  895. vendor=acorn
  896. ;;
  897. -sunos*)
  898. vendor=sun
  899. ;;
  900. -aix*)
  901. vendor=ibm
  902. ;;
  903. -hpux*)
  904. vendor=hp
  905. ;;
  906. -hiux*)
  907. vendor=hitachi
  908. ;;
  909. -unos*)
  910. vendor=crds
  911. ;;
  912. -dgux*)
  913. vendor=dg
  914. ;;
  915. -luna*)
  916. vendor=omron
  917. ;;
  918. -genix*)
  919. vendor=ns
  920. ;;
  921. -mvs*)
  922. vendor=ibm
  923. ;;
  924. -ptx*)
  925. vendor=sequent
  926. ;;
  927. -vxsim* | -vxworks*)
  928. vendor=wrs
  929. ;;
  930. -aux*)
  931. vendor=apple
  932. ;;
  933. esac
  934. basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
  935. ;;
  936. esac
  937. echo $basic_machine$os