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.

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