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

Ftp客户端

开发平台:

Unix_Linux

  1. #! /bin/sh
  2. # Configuration validation subroutine script, version 1.1.
  3. #   Copyright (C) 1991, 92, 93, 94, 95, 1996 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 | m68k | m68000 | m88k | ns32k | arm 
  144. | arme[lb] | pyramid 
  145. | tron | a29k | 580 | i960 | h8300 | hppa | hppa1.0 | hppa1.1 
  146. | alpha | we32k | ns16k | clipper | i370 | sh 
  147. | powerpc | powerpcle | 1750a | dsp16xx | mips64 | mipsel 
  148. | pdp11 | mips64el | mips64orion | mips64orionel 
  149. | sparc | sparclet | sparclite | sparc64)
  150. basic_machine=$basic_machine-unknown
  151. ;;
  152. # We use `pc' rather than `unknown'
  153. # because (1) that's what they normally are, and
  154. # (2) the word "unknown" tends to confuse beginning users.
  155. i[3456]86)
  156.   basic_machine=$basic_machine-pc
  157.   ;;
  158. # Object if more than one company name word.
  159. *-*-*)
  160. echo Invalid configuration `$1': machine `$basic_machine' not recognized 1>&2
  161. exit 1
  162. ;;
  163. # Recognize the basic CPU types with company name.
  164. vax-* | tahoe-* | i[3456]86-* | i860-* | m68k-* | m68000-* | m88k-* 
  165.       | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* 
  166.       | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* 
  167.       | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* 
  168.       | hppa-* | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* 
  169.       | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* 
  170.       | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* 
  171.       | mips64el-* | mips64orion-* | mips64orionel-* | f301-*)
  172. ;;
  173. # Recognize the various machine names and aliases which stand
  174. # for a CPU type and a company and sometimes even an OS.
  175. 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
  176. basic_machine=m68000-att
  177. ;;
  178. 3b*)
  179. basic_machine=we32k-att
  180. ;;
  181. alliant | fx80)
  182. basic_machine=fx80-alliant
  183. ;;
  184. altos | altos3068)
  185. basic_machine=m68k-altos
  186. ;;
  187. am29k)
  188. basic_machine=a29k-none
  189. os=-bsd
  190. ;;
  191. amdahl)
  192. basic_machine=580-amdahl
  193. os=-sysv
  194. ;;
  195. amiga | amiga-*)
  196. basic_machine=m68k-cbm
  197. ;;
  198. amigados)
  199. basic_machine=m68k-cbm
  200. os=-amigados
  201. ;;
  202. amigaunix | amix)
  203. basic_machine=m68k-cbm
  204. os=-sysv4
  205. ;;
  206. apollo68)
  207. basic_machine=m68k-apollo
  208. os=-sysv
  209. ;;
  210. aux)
  211. basic_machine=m68k-apple
  212. os=-aux
  213. ;;
  214. balance)
  215. basic_machine=ns32k-sequent
  216. os=-dynix
  217. ;;
  218. convex-c1)
  219. basic_machine=c1-convex
  220. os=-bsd
  221. ;;
  222. convex-c2)
  223. basic_machine=c2-convex
  224. os=-bsd
  225. ;;
  226. convex-c32)
  227. basic_machine=c32-convex
  228. os=-bsd
  229. ;;
  230. convex-c34)
  231. basic_machine=c34-convex
  232. os=-bsd
  233. ;;
  234. convex-c38)
  235. basic_machine=c38-convex
  236. os=-bsd
  237. ;;
  238. cray | ymp)
  239. basic_machine=ymp-cray
  240. os=-unicos
  241. ;;
  242. cray2)
  243. basic_machine=cray2-cray
  244. os=-unicos
  245. ;;
  246. [ctj]90-cray)
  247. basic_machine=c90-cray
  248. os=-unicos
  249. ;;
  250. crds | unos)
  251. basic_machine=m68k-crds
  252. ;;
  253. da30 | da30-*)
  254. basic_machine=m68k-da30
  255. ;;
  256. decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
  257. basic_machine=mips-dec
  258. ;;
  259. delta | 3300 | motorola-3300 | motorola-delta 
  260.       | 3300-motorola | delta-motorola)
  261. basic_machine=m68k-motorola
  262. ;;
  263. delta88)
  264. basic_machine=m88k-motorola
  265. os=-sysv3
  266. ;;
  267. dpx20 | dpx20-*)
  268. basic_machine=rs6000-bull
  269. os=-bosx
  270. ;;
  271. dpx2* | dpx2*-bull)
  272. basic_machine=m68k-bull
  273. os=-sysv3
  274. ;;
  275. ebmon29k)
  276. basic_machine=a29k-amd
  277. os=-ebmon
  278. ;;
  279. elxsi)
  280. basic_machine=elxsi-elxsi
  281. os=-bsd
  282. ;;
  283. encore | umax | mmax)
  284. basic_machine=ns32k-encore
  285. ;;
  286. fx2800)
  287. basic_machine=i860-alliant
  288. ;;
  289. genix)
  290. basic_machine=ns32k-ns
  291. ;;
  292. gmicro)
  293. basic_machine=tron-gmicro
  294. os=-sysv
  295. ;;
  296. h3050r* | hiux*)
  297. basic_machine=hppa1.1-hitachi
  298. os=-hiuxwe2
  299. ;;
  300. h8300hms)
  301. basic_machine=h8300-hitachi
  302. os=-hms
  303. ;;
  304. harris)
  305. basic_machine=m88k-harris
  306. os=-sysv3
  307. ;;
  308. hp300-*)
  309. basic_machine=m68k-hp
  310. ;;
  311. hp300bsd)
  312. basic_machine=m68k-hp
  313. os=-bsd
  314. ;;
  315. hp300hpux)
  316. basic_machine=m68k-hp
  317. os=-hpux
  318. ;;
  319. hp9k2[0-9][0-9] | hp9k31[0-9])
  320. basic_machine=m68000-hp
  321. ;;
  322. hp9k3[2-9][0-9])
  323. basic_machine=m68k-hp
  324. ;;
  325. hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
  326. basic_machine=hppa1.1-hp
  327. ;;
  328. hp9k8[0-9][0-9] | hp8[0-9][0-9])
  329. basic_machine=hppa1.0-hp
  330. ;;
  331. hppa-next)
  332. os=-nextstep3
  333. ;;
  334. i370-ibm* | ibm*)
  335. basic_machine=i370-ibm
  336. os=-mvs
  337. ;;
  338. # I'm not sure what "Sysv32" means.  Should this be sysv3.2?
  339. i[3456]86v32)
  340. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  341. os=-sysv32
  342. ;;
  343. i[3456]86v4*)
  344. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  345. os=-sysv4
  346. ;;
  347. i[3456]86v)
  348. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  349. os=-sysv
  350. ;;
  351. i[3456]86sol2)
  352. basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
  353. os=-solaris2
  354. ;;
  355. iris | iris4d)
  356. basic_machine=mips-sgi
  357. case $os in
  358.     -irix*)
  359. ;;
  360.     *)
  361. os=-irix4
  362. ;;
  363. esac
  364. ;;
  365. isi68 | isi)
  366. basic_machine=m68k-isi
  367. os=-sysv
  368. ;;
  369. m88k-omron*)
  370. basic_machine=m88k-omron
  371. ;;
  372. magnum | m3230)
  373. basic_machine=mips-mips
  374. os=-sysv
  375. ;;
  376. merlin)
  377. basic_machine=ns32k-utek
  378. os=-sysv
  379. ;;
  380. miniframe)
  381. basic_machine=m68000-convergent
  382. ;;
  383. mips3*-*)
  384. basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
  385. ;;
  386. mips3*)
  387. basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
  388. ;;
  389. ncr3000)
  390. basic_machine=i486-ncr
  391. os=-sysv4
  392. ;;
  393. news | news700 | news800 | news900)
  394. basic_machine=m68k-sony
  395. os=-newsos
  396. ;;
  397. news1000)
  398. basic_machine=m68030-sony
  399. os=-newsos
  400. ;;
  401. news-3600 | risc-news)
  402. basic_machine=mips-sony
  403. os=-newsos
  404. ;;
  405. next | m*-next )
  406. basic_machine=m68k-next
  407. case $os in
  408.     -nextstep* )
  409. ;;
  410.     -ns2*)
  411.       os=-nextstep2
  412. ;;
  413.     *)
  414.       os=-nextstep3
  415. ;;
  416. esac
  417. ;;
  418. nh3000)
  419. basic_machine=m68k-harris
  420. os=-cxux
  421. ;;
  422. nh[45]000)
  423. basic_machine=m88k-harris
  424. os=-cxux
  425. ;;
  426. nindy960)
  427. basic_machine=i960-intel
  428. os=-nindy
  429. ;;
  430. np1)
  431. basic_machine=np1-gould
  432. ;;
  433. pa-hitachi)
  434. basic_machine=hppa1.1-hitachi
  435. os=-hiuxwe2
  436. ;;
  437. paragon)
  438. basic_machine=i860-intel
  439. os=-osf
  440. ;;
  441. pbd)
  442. basic_machine=sparc-tti
  443. ;;
  444. pbb)
  445. basic_machine=m68k-tti
  446. ;;
  447.         pc532 | pc532-*)
  448. basic_machine=ns32k-pc532
  449. ;;
  450. pentium | p5)
  451. basic_machine=i586-intel
  452. ;;
  453. pentiumpro | p6)
  454. basic_machine=i686-intel
  455. ;;
  456. pentium-* | p5-*)
  457. basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
  458. ;;
  459. pentiumpro-* | p6-*)
  460. basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
  461. ;;
  462. k5)
  463. # We don't have specific support for AMD's K5 yet, so just call it a Pentium
  464. basic_machine=i586-amd
  465. ;;
  466. nexen)
  467. # We don't have specific support for Nexgen yet, so just call it a Pentium
  468. basic_machine=i586-nexgen
  469. ;;
  470. pn)
  471. basic_machine=pn-gould
  472. ;;
  473. power) basic_machine=rs6000-ibm
  474. ;;
  475. ppc) basic_machine=powerpc-unknown
  476.         ;;
  477. ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
  478. ;;
  479. ppcle | powerpclittle | ppc-le | powerpc-little)
  480. basic_machine=powerpcle-unknown
  481.         ;;
  482. ppcle-* | powerpclittle-*)
  483. basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
  484. ;;
  485. ps2)
  486. basic_machine=i386-ibm
  487. ;;
  488. rm[46]00)
  489. basic_machine=mips-siemens
  490. ;;
  491. rtpc | rtpc-*)
  492. basic_machine=romp-ibm
  493. ;;
  494. sequent)
  495. basic_machine=i386-sequent
  496. ;;
  497. sh)
  498. basic_machine=sh-hitachi
  499. os=-hms
  500. ;;
  501. sps7)
  502. basic_machine=m68k-bull
  503. os=-sysv2
  504. ;;
  505. spur)
  506. basic_machine=spur-unknown
  507. ;;
  508. sun2)
  509. basic_machine=m68000-sun
  510. ;;
  511. sun2os3)
  512. basic_machine=m68000-sun
  513. os=-sunos3
  514. ;;
  515. sun2os4)
  516. basic_machine=m68000-sun
  517. os=-sunos4
  518. ;;
  519. sun3os3)
  520. basic_machine=m68k-sun
  521. os=-sunos3
  522. ;;
  523. sun3os4)
  524. basic_machine=m68k-sun
  525. os=-sunos4
  526. ;;
  527. sun4os3)
  528. basic_machine=sparc-sun
  529. os=-sunos3
  530. ;;
  531. sun4os4)
  532. basic_machine=sparc-sun
  533. os=-sunos4
  534. ;;
  535. sun4sol2)
  536. basic_machine=sparc-sun
  537. os=-solaris2
  538. ;;
  539. sun3 | sun3-*)
  540. basic_machine=m68k-sun
  541. ;;
  542. sun4)
  543. basic_machine=sparc-sun
  544. ;;
  545. sun386 | sun386i | roadrunner)
  546. basic_machine=i386-sun
  547. ;;
  548. symmetry)
  549. basic_machine=i386-sequent
  550. os=-dynix
  551. ;;
  552. tower | tower-32)
  553. basic_machine=m68k-ncr
  554. ;;
  555. udi29k)
  556. basic_machine=a29k-amd
  557. os=-udi
  558. ;;
  559. ultra3)
  560. basic_machine=a29k-nyu
  561. os=-sym1
  562. ;;
  563. vaxv)
  564. basic_machine=vax-dec
  565. os=-sysv
  566. ;;
  567. vms)
  568. basic_machine=vax-dec
  569. os=-vms
  570. ;;
  571.        vpp*|vx|vx-*)
  572.                basic_machine=f301-fujitsu
  573.                ;;
  574. vxworks960)
  575. basic_machine=i960-wrs
  576. os=-vxworks
  577. ;;
  578. vxworks68)
  579. basic_machine=m68k-wrs
  580. os=-vxworks
  581. ;;
  582. vxworks29k)
  583. basic_machine=a29k-wrs
  584. os=-vxworks
  585. ;;
  586. xmp)
  587. basic_machine=xmp-cray
  588. os=-unicos
  589. ;;
  590.         xps | xps100)
  591. basic_machine=xps100-honeywell
  592. ;;
  593. none)
  594. basic_machine=none-none
  595. os=-none
  596. ;;
  597. # Here we handle the default manufacturer of certain CPU types.  It is in
  598. # some cases the only manufacturer, in others, it is the most popular.
  599. mips)
  600. basic_machine=mips-mips
  601. ;;
  602. romp)
  603. basic_machine=romp-ibm
  604. ;;
  605. rs6000)
  606. basic_machine=rs6000-ibm
  607. ;;
  608. vax)
  609. basic_machine=vax-dec
  610. ;;
  611. pdp11)
  612. basic_machine=pdp11-dec
  613. ;;
  614. we32k)
  615. basic_machine=we32k-att
  616. ;;
  617. sparc)
  618. basic_machine=sparc-sun
  619. ;;
  620.         cydra)
  621. basic_machine=cydra-cydrome
  622. ;;
  623. orion)
  624. basic_machine=orion-highlevel
  625. ;;
  626. orion105)
  627. basic_machine=clipper-highlevel
  628. ;;
  629. *)
  630. echo Invalid configuration `$1': machine `$basic_machine' not recognized 1>&2
  631. exit 1
  632. ;;
  633. esac
  634. # Here we canonicalize certain aliases for manufacturers.
  635. case $basic_machine in
  636. *-digital*)
  637. basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
  638. ;;
  639. *-commodore*)
  640. basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
  641. ;;
  642. *)
  643. ;;
  644. esac
  645. # Decode manufacturer-specific aliases for certain operating systems.
  646. if [ x"$os" != x"" ]
  647. then
  648. case $os in
  649.         # First match some system type aliases
  650.         # that might get confused with valid system types.
  651. # -solaris* is a basic system type, with this one exception.
  652. -solaris1 | -solaris1.*)
  653. os=`echo $os | sed -e 's|solaris1|sunos4|'`
  654. ;;
  655. -solaris)
  656. os=-solaris2
  657. ;;
  658. -unixware* | svr4*)
  659. os=-sysv4
  660. ;;
  661. -gnu/linux*)
  662. os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
  663. ;;
  664. # First accept the basic system types.
  665. # The portable systems comes first.
  666. # Each alternative MUST END IN A *, to match a version number.
  667. # -sysv* is not here because it comes later, after sysvr4.
  668. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* 
  669.       | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*
  670.       | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* 
  671.       | -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* 
  672.       | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* 
  673.       | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* 
  674.       | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* 
  675.       | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* 
  676.       | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* 
  677.       | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* 
  678.       | -cygwin32* | -pe* | -psos* | -moss* | -proelf* | -rtems* 
  679.       | -linux-gnu* | -uxpv*)
  680. # Remember, each alternative MUST END IN *, to match a version number.
  681. ;;
  682. -linux*)
  683. os=`echo $os | sed -e 's|linux|linux-gnu|'`
  684. ;;
  685. -sunos5*)
  686. os=`echo $os | sed -e 's|sunos5|solaris2|'`
  687. ;;
  688. -sunos6*)
  689. os=`echo $os | sed -e 's|sunos6|solaris3|'`
  690. ;;
  691. -osfrose*)
  692. os=-osfrose
  693. ;;
  694. -osf*)
  695. os=-osf
  696. ;;
  697. -utek*)
  698. os=-bsd
  699. ;;
  700. -dynix*)
  701. os=-bsd
  702. ;;
  703. -acis*)
  704. os=-aos
  705. ;;
  706. -ctix* | -uts*)
  707. os=-sysv
  708. ;;
  709. -ns2 )
  710.         os=-nextstep2
  711. ;;
  712. # Preserve the version number of sinix5.
  713. -sinix5.*)
  714. os=`echo $os | sed -e 's|sinix|sysv|'`
  715. ;;
  716. -sinix*)
  717. os=-sysv4
  718. ;;
  719. -triton*)
  720. os=-sysv3
  721. ;;
  722. -oss*)
  723. os=-sysv3
  724. ;;
  725. -svr4)
  726. os=-sysv4
  727. ;;
  728. -svr3)
  729. os=-sysv3
  730. ;;
  731. -sysvr4)
  732. os=-sysv4
  733. ;;
  734. # This must come after -sysvr4.
  735. -sysv*)
  736. ;;
  737. -xenix)
  738. os=-xenix
  739. ;;
  740. -none)
  741. ;;
  742. *)
  743. # Get rid of the `-' at the beginning of $os.
  744. os=`echo $os | sed 's/[^-]*-//'`
  745. echo Invalid configuration `$1': system `$os' not recognized 1>&2
  746. exit 1
  747. ;;
  748. esac
  749. else
  750. # Here we handle the default operating systems that come with various machines.
  751. # The value should be what the vendor currently ships out the door with their
  752. # machine or put another way, the most popular os provided with the machine.
  753. # Note that if you're going to try to match "-MANUFACTURER" here (say,
  754. # "-sun"), then you have to tell the case statement up towards the top
  755. # that MANUFACTURER isn't an operating system.  Otherwise, code above
  756. # will signal an error saying that MANUFACTURER isn't an operating
  757. # system, and we'll never get to this point.
  758. case $basic_machine in
  759. *-acorn)
  760. os=-riscix1.2
  761. ;;
  762. arm*-semi)
  763. os=-aout
  764. ;;
  765.         pdp11-*)
  766. os=-none
  767. ;;
  768. *-dec | vax-*)
  769. os=-ultrix4.2
  770. ;;
  771. m68*-apollo)
  772. os=-domain
  773. ;;
  774. i386-sun)
  775. os=-sunos4.0.2
  776. ;;
  777. m68000-sun)
  778. os=-sunos3
  779. # This also exists in the configure program, but was not the
  780. # default.
  781. # os=-sunos4
  782. ;;
  783. *-tti) # must be before sparc entry or we get the wrong os.
  784. os=-sysv3
  785. ;;
  786. sparc-* | *-sun)
  787. os=-sunos4.1.1
  788. ;;
  789. *-ibm)
  790. os=-aix
  791. ;;
  792. *-hp)
  793. os=-hpux
  794. ;;
  795. *-hitachi)
  796. os=-hiux
  797. ;;
  798. i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
  799. os=-sysv
  800. ;;
  801. *-cbm)
  802. os=-amigados
  803. ;;
  804. *-dg)
  805. os=-dgux
  806. ;;
  807. *-dolphin)
  808. os=-sysv3
  809. ;;
  810. m68k-ccur)
  811. os=-rtu
  812. ;;
  813. m88k-omron*)
  814. os=-luna
  815. ;;
  816. *-next )
  817. os=-nextstep
  818. ;;
  819. *-sequent)
  820. os=-ptx
  821. ;;
  822. *-crds)
  823. os=-unos
  824. ;;
  825. *-ns)
  826. os=-genix
  827. ;;
  828. i370-*)
  829. os=-mvs
  830. ;;
  831. *-next)
  832. os=-nextstep3
  833. ;;
  834.         *-gould)
  835. os=-sysv
  836. ;;
  837.         *-highlevel)
  838. os=-bsd
  839. ;;
  840. *-encore)
  841. os=-bsd
  842. ;;
  843.         *-sgi)
  844. os=-irix
  845. ;;
  846.         *-siemens)
  847. os=-sysv4
  848. ;;
  849. *-masscomp)
  850. os=-rtu
  851. ;;
  852. f301-fujitsu)
  853. os=-uxpv
  854. ;;
  855. *)
  856. os=-none
  857. ;;
  858. esac
  859. fi
  860. # Here we handle the case where we know the os, and the CPU type, but not the
  861. # manufacturer.  We pick the logical manufacturer.
  862. vendor=unknown
  863. case $basic_machine in
  864. *-unknown)
  865. case $os in
  866. -riscix*)
  867. vendor=acorn
  868. ;;
  869. -sunos*)
  870. vendor=sun
  871. ;;
  872. -aix*)
  873. vendor=ibm
  874. ;;
  875. -hpux*)
  876. vendor=hp
  877. ;;
  878. -hiux*)
  879. vendor=hitachi
  880. ;;
  881. -unos*)
  882. vendor=crds
  883. ;;
  884. -dgux*)
  885. vendor=dg
  886. ;;
  887. -luna*)
  888. vendor=omron
  889. ;;
  890. -genix*)
  891. vendor=ns
  892. ;;
  893. -mvs*)
  894. vendor=ibm
  895. ;;
  896. -ptx*)
  897. vendor=sequent
  898. ;;
  899. -vxsim* | -vxworks*)
  900. vendor=wrs
  901. ;;
  902. -aux*)
  903. vendor=apple
  904. ;;
  905. esac
  906. basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
  907. ;;
  908. esac
  909. echo $basic_machine$os