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.

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