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.

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