Audio plugin host https://kx.studio/carla
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.

1367 lines
27KB

  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='2012-11-19'
  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 | powerpc64 | 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)
  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)
  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-* | powerpc-* | powerpc64-* | powerpcle-* \
  252. | 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. ppc64) basic_machine=powerpc64-unknown
  702. ;;
  703. ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
  704. ;;
  705. ppcle | powerpclittle | ppc-le | powerpc-little)
  706. basic_machine=powerpcle-unknown
  707. ;;
  708. ppcle-* | powerpclittle-*)
  709. basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
  710. ;;
  711. ps2)
  712. basic_machine=i386-ibm
  713. ;;
  714. pw32)
  715. basic_machine=i586-unknown
  716. os=-pw32
  717. ;;
  718. rom68k)
  719. basic_machine=m68k-rom68k
  720. os=-coff
  721. ;;
  722. rm[46]00)
  723. basic_machine=mips-siemens
  724. ;;
  725. rtpc | rtpc-*)
  726. basic_machine=romp-ibm
  727. ;;
  728. sa29200)
  729. basic_machine=a29k-amd
  730. os=-udi
  731. ;;
  732. sequent)
  733. basic_machine=i386-sequent
  734. ;;
  735. sh)
  736. basic_machine=sh-hitachi
  737. os=-hms
  738. ;;
  739. sparclite-wrs)
  740. basic_machine=sparclite-wrs
  741. os=-vxworks
  742. ;;
  743. sps7)
  744. basic_machine=m68k-bull
  745. os=-sysv2
  746. ;;
  747. spur)
  748. basic_machine=spur-unknown
  749. ;;
  750. st2000)
  751. basic_machine=m68k-tandem
  752. ;;
  753. stratus)
  754. basic_machine=i860-stratus
  755. os=-sysv4
  756. ;;
  757. sun2)
  758. basic_machine=m68000-sun
  759. ;;
  760. sun2os3)
  761. basic_machine=m68000-sun
  762. os=-sunos3
  763. ;;
  764. sun2os4)
  765. basic_machine=m68000-sun
  766. os=-sunos4
  767. ;;
  768. sun3os3)
  769. basic_machine=m68k-sun
  770. os=-sunos3
  771. ;;
  772. sun3os4)
  773. basic_machine=m68k-sun
  774. os=-sunos4
  775. ;;
  776. sun4os3)
  777. basic_machine=sparc-sun
  778. os=-sunos3
  779. ;;
  780. sun4os4)
  781. basic_machine=sparc-sun
  782. os=-sunos4
  783. ;;
  784. sun4sol2)
  785. basic_machine=sparc-sun
  786. os=-solaris2
  787. ;;
  788. sun3 | sun3-*)
  789. basic_machine=m68k-sun
  790. ;;
  791. sun4)
  792. basic_machine=sparc-sun
  793. ;;
  794. sun386 | sun386i | roadrunner)
  795. basic_machine=i386-sun
  796. ;;
  797. sv1)
  798. basic_machine=sv1-cray
  799. os=-unicos
  800. ;;
  801. symmetry)
  802. basic_machine=i386-sequent
  803. os=-dynix
  804. ;;
  805. t3e)
  806. basic_machine=t3e-cray
  807. os=-unicos
  808. ;;
  809. tic54x | c54x*)
  810. basic_machine=tic54x-unknown
  811. os=-coff
  812. ;;
  813. tx39)
  814. basic_machine=mipstx39-unknown
  815. ;;
  816. tx39el)
  817. basic_machine=mipstx39el-unknown
  818. ;;
  819. tower | tower-32)
  820. basic_machine=m68k-ncr
  821. ;;
  822. udi29k)
  823. basic_machine=a29k-amd
  824. os=-udi
  825. ;;
  826. ultra3)
  827. basic_machine=a29k-nyu
  828. os=-sym1
  829. ;;
  830. v810 | necv810)
  831. basic_machine=v810-nec
  832. os=-none
  833. ;;
  834. vaxv)
  835. basic_machine=vax-dec
  836. os=-sysv
  837. ;;
  838. vms)
  839. basic_machine=vax-dec
  840. os=-vms
  841. ;;
  842. vpp*|vx|vx-*)
  843. basic_machine=f301-fujitsu
  844. ;;
  845. vxworks960)
  846. basic_machine=i960-wrs
  847. os=-vxworks
  848. ;;
  849. vxworks68)
  850. basic_machine=m68k-wrs
  851. os=-vxworks
  852. ;;
  853. vxworks29k)
  854. basic_machine=a29k-wrs
  855. os=-vxworks
  856. ;;
  857. w65*)
  858. basic_machine=w65-wdc
  859. os=-none
  860. ;;
  861. w89k-*)
  862. basic_machine=hppa1.1-winbond
  863. os=-proelf
  864. ;;
  865. xmp)
  866. basic_machine=xmp-cray
  867. os=-unicos
  868. ;;
  869. xps | xps100)
  870. basic_machine=xps100-honeywell
  871. ;;
  872. z8k-*-coff)
  873. basic_machine=z8k-unknown
  874. os=-sim
  875. ;;
  876. none)
  877. basic_machine=none-none
  878. os=-none
  879. ;;
  880. # Here we handle the default manufacturer of certain CPU types. It is in
  881. # some cases the only manufacturer, in others, it is the most popular.
  882. w89k)
  883. basic_machine=hppa1.1-winbond
  884. ;;
  885. op50n)
  886. basic_machine=hppa1.1-oki
  887. ;;
  888. op60c)
  889. basic_machine=hppa1.1-oki
  890. ;;
  891. mips)
  892. if [ x$os = x-linux-gnu ]; then
  893. basic_machine=mips-unknown
  894. else
  895. basic_machine=mips-mips
  896. fi
  897. ;;
  898. romp)
  899. basic_machine=romp-ibm
  900. ;;
  901. rs6000)
  902. basic_machine=rs6000-ibm
  903. ;;
  904. vax)
  905. basic_machine=vax-dec
  906. ;;
  907. pdp10)
  908. # there are many clones, so DEC is not a safe bet
  909. basic_machine=pdp10-unknown
  910. ;;
  911. pdp11)
  912. basic_machine=pdp11-dec
  913. ;;
  914. we32k)
  915. basic_machine=we32k-att
  916. ;;
  917. sh3 | sh4)
  918. basic_machine=sh-unknown
  919. ;;
  920. sparc | sparcv9 | sparcv9b)
  921. basic_machine=sparc-sun
  922. ;;
  923. cydra)
  924. basic_machine=cydra-cydrome
  925. ;;
  926. orion)
  927. basic_machine=orion-highlevel
  928. ;;
  929. orion105)
  930. basic_machine=clipper-highlevel
  931. ;;
  932. mac | mpw | mac-mpw)
  933. basic_machine=m68k-apple
  934. ;;
  935. pmac | pmac-mpw)
  936. basic_machine=powerpc-apple
  937. ;;
  938. c4x*)
  939. basic_machine=c4x-none
  940. os=-coff
  941. ;;
  942. *-unknown)
  943. # Make sure to match an already-canonicalized machine name.
  944. ;;
  945. *)
  946. echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
  947. exit 1
  948. ;;
  949. esac
  950. # Here we canonicalize certain aliases for manufacturers.
  951. case $basic_machine in
  952. *-digital*)
  953. basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
  954. ;;
  955. *-commodore*)
  956. basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
  957. ;;
  958. *)
  959. ;;
  960. esac
  961. # Decode manufacturer-specific aliases for certain operating systems.
  962. if [ x"$os" != x"" ]
  963. then
  964. case $os in
  965. # First match some system type aliases
  966. # that might get confused with valid system types.
  967. # -solaris* is a basic system type, with this one exception.
  968. -solaris1 | -solaris1.*)
  969. os=`echo $os | sed -e 's|solaris1|sunos4|'`
  970. ;;
  971. -solaris)
  972. os=-solaris2
  973. ;;
  974. -svr4*)
  975. os=-sysv4
  976. ;;
  977. -unixware*)
  978. os=-sysv4.2uw
  979. ;;
  980. -gnu/linux*)
  981. os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
  982. ;;
  983. # First accept the basic system types.
  984. # The portable systems comes first.
  985. # Each alternative MUST END IN A *, to match a version number.
  986. # -sysv* is not here because it comes later, after sysvr4.
  987. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
  988. | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
  989. | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
  990. | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
  991. | -aos* \
  992. | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
  993. | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
  994. | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
  995. | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
  996. | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
  997. | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
  998. | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
  999. | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
  1000. | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
  1001. | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
  1002. | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*)
  1003. # Remember, each alternative MUST END IN *, to match a version number.
  1004. ;;
  1005. -qnx*)
  1006. case $basic_machine in
  1007. x86-* | i*86-*)
  1008. ;;
  1009. *)
  1010. os=-nto$os
  1011. ;;
  1012. esac
  1013. ;;
  1014. -nto*)
  1015. os=-nto-qnx
  1016. ;;
  1017. -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
  1018. | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
  1019. | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
  1020. ;;
  1021. -mac*)
  1022. os=`echo $os | sed -e 's|mac|macos|'`
  1023. ;;
  1024. -linux*)
  1025. os=`echo $os | sed -e 's|linux|linux-gnu|'`
  1026. ;;
  1027. -sunos5*)
  1028. os=`echo $os | sed -e 's|sunos5|solaris2|'`
  1029. ;;
  1030. -sunos6*)
  1031. os=`echo $os | sed -e 's|sunos6|solaris3|'`
  1032. ;;
  1033. -opened*)
  1034. os=-openedition
  1035. ;;
  1036. -wince*)
  1037. os=-wince
  1038. ;;
  1039. -osfrose*)
  1040. os=-osfrose
  1041. ;;
  1042. -osf*)
  1043. os=-osf
  1044. ;;
  1045. -utek*)
  1046. os=-bsd
  1047. ;;
  1048. -dynix*)
  1049. os=-bsd
  1050. ;;
  1051. -acis*)
  1052. os=-aos
  1053. ;;
  1054. -386bsd)
  1055. os=-bsd
  1056. ;;
  1057. -ctix* | -uts*)
  1058. os=-sysv
  1059. ;;
  1060. -ns2 )
  1061. os=-nextstep2
  1062. ;;
  1063. -nsk*)
  1064. os=-nsk
  1065. ;;
  1066. # Preserve the version number of sinix5.
  1067. -sinix5.*)
  1068. os=`echo $os | sed -e 's|sinix|sysv|'`
  1069. ;;
  1070. -sinix*)
  1071. os=-sysv4
  1072. ;;
  1073. -triton*)
  1074. os=-sysv3
  1075. ;;
  1076. -oss*)
  1077. os=-sysv3
  1078. ;;
  1079. -svr4)
  1080. os=-sysv4
  1081. ;;
  1082. -svr3)
  1083. os=-sysv3
  1084. ;;
  1085. -sysvr4)
  1086. os=-sysv4
  1087. ;;
  1088. # This must come after -sysvr4.
  1089. -sysv*)
  1090. ;;
  1091. -ose*)
  1092. os=-ose
  1093. ;;
  1094. -es1800*)
  1095. os=-ose
  1096. ;;
  1097. -xenix)
  1098. os=-xenix
  1099. ;;
  1100. -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
  1101. os=-mint
  1102. ;;
  1103. -none)
  1104. ;;
  1105. *)
  1106. # Get rid of the `-' at the beginning of $os.
  1107. os=`echo $os | sed 's/[^-]*-//'`
  1108. echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
  1109. exit 1
  1110. ;;
  1111. esac
  1112. else
  1113. # Here we handle the default operating systems that come with various machines.
  1114. # The value should be what the vendor currently ships out the door with their
  1115. # machine or put another way, the most popular os provided with the machine.
  1116. # Note that if you're going to try to match "-MANUFACTURER" here (say,
  1117. # "-sun"), then you have to tell the case statement up towards the top
  1118. # that MANUFACTURER isn't an operating system. Otherwise, code above
  1119. # will signal an error saying that MANUFACTURER isn't an operating
  1120. # system, and we'll never get to this point.
  1121. case $basic_machine in
  1122. *-acorn)
  1123. os=-riscix1.2
  1124. ;;
  1125. arm*-rebel)
  1126. os=-linux
  1127. ;;
  1128. arm*-semi)
  1129. os=-aout
  1130. ;;
  1131. pdp10-*)
  1132. os=-tops20
  1133. ;;
  1134. pdp11-*)
  1135. os=-none
  1136. ;;
  1137. *-dec | vax-*)
  1138. os=-ultrix4.2
  1139. ;;
  1140. m68*-apollo)
  1141. os=-domain
  1142. ;;
  1143. i386-sun)
  1144. os=-sunos4.0.2
  1145. ;;
  1146. m68000-sun)
  1147. os=-sunos3
  1148. # This also exists in the configure program, but was not the
  1149. # default.
  1150. # os=-sunos4
  1151. ;;
  1152. m68*-cisco)
  1153. os=-aout
  1154. ;;
  1155. mips*-cisco)
  1156. os=-elf
  1157. ;;
  1158. mips*-*)
  1159. os=-elf
  1160. ;;
  1161. *-tti) # must be before sparc entry or we get the wrong os.
  1162. os=-sysv3
  1163. ;;
  1164. sparc-* | *-sun)
  1165. os=-sunos4.1.1
  1166. ;;
  1167. *-be)
  1168. os=-beos
  1169. ;;
  1170. *-ibm)
  1171. os=-aix
  1172. ;;
  1173. *-wec)
  1174. os=-proelf
  1175. ;;
  1176. *-winbond)
  1177. os=-proelf
  1178. ;;
  1179. *-oki)
  1180. os=-proelf
  1181. ;;
  1182. *-hp)
  1183. os=-hpux
  1184. ;;
  1185. *-hitachi)
  1186. os=-hiux
  1187. ;;
  1188. i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
  1189. os=-sysv
  1190. ;;
  1191. *-cbm)
  1192. os=-amigaos
  1193. ;;
  1194. *-dg)
  1195. os=-dgux
  1196. ;;
  1197. *-dolphin)
  1198. os=-sysv3
  1199. ;;
  1200. m68k-ccur)
  1201. os=-rtu
  1202. ;;
  1203. m88k-omron*)
  1204. os=-luna
  1205. ;;
  1206. *-next )
  1207. os=-nextstep
  1208. ;;
  1209. *-sequent)
  1210. os=-ptx
  1211. ;;
  1212. *-crds)
  1213. os=-unos
  1214. ;;
  1215. *-ns)
  1216. os=-genix
  1217. ;;
  1218. i370-*)
  1219. os=-mvs
  1220. ;;
  1221. *-next)
  1222. os=-nextstep3
  1223. ;;
  1224. *-gould)
  1225. os=-sysv
  1226. ;;
  1227. *-highlevel)
  1228. os=-bsd
  1229. ;;
  1230. *-encore)
  1231. os=-bsd
  1232. ;;
  1233. *-sgi)
  1234. os=-irix
  1235. ;;
  1236. *-siemens)
  1237. os=-sysv4
  1238. ;;
  1239. *-masscomp)
  1240. os=-rtu
  1241. ;;
  1242. f30[01]-fujitsu | f700-fujitsu)
  1243. os=-uxpv
  1244. ;;
  1245. *-rom68k)
  1246. os=-coff
  1247. ;;
  1248. *-*bug)
  1249. os=-coff
  1250. ;;
  1251. *-apple)
  1252. os=-macos
  1253. ;;
  1254. *-atari*)
  1255. os=-mint
  1256. ;;
  1257. *)
  1258. os=-none
  1259. ;;
  1260. esac
  1261. fi
  1262. # Here we handle the case where we know the os, and the CPU type, but not the
  1263. # manufacturer. We pick the logical manufacturer.
  1264. vendor=unknown
  1265. case $basic_machine in
  1266. *-unknown)
  1267. case $os in
  1268. -riscix*)
  1269. vendor=acorn
  1270. ;;
  1271. -sunos*)
  1272. vendor=sun
  1273. ;;
  1274. -aix*)
  1275. vendor=ibm
  1276. ;;
  1277. -beos*)
  1278. vendor=be
  1279. ;;
  1280. -hpux*)
  1281. vendor=hp
  1282. ;;
  1283. -mpeix*)
  1284. vendor=hp
  1285. ;;
  1286. -hiux*)
  1287. vendor=hitachi
  1288. ;;
  1289. -unos*)
  1290. vendor=crds
  1291. ;;
  1292. -dgux*)
  1293. vendor=dg
  1294. ;;
  1295. -luna*)
  1296. vendor=omron
  1297. ;;
  1298. -genix*)
  1299. vendor=ns
  1300. ;;
  1301. -mvs* | -opened*)
  1302. vendor=ibm
  1303. ;;
  1304. -ptx*)
  1305. vendor=sequent
  1306. ;;
  1307. -vxsim* | -vxworks*)
  1308. vendor=wrs
  1309. ;;
  1310. -aux*)
  1311. vendor=apple
  1312. ;;
  1313. -hms*)
  1314. vendor=hitachi
  1315. ;;
  1316. -mpw* | -macos*)
  1317. vendor=apple
  1318. ;;
  1319. -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
  1320. vendor=atari
  1321. ;;
  1322. esac
  1323. basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
  1324. ;;
  1325. esac
  1326. echo $basic_machine$os
  1327. exit 0
  1328. # Local variables:
  1329. # eval: (add-hook 'write-file-hooks 'time-stamp)
  1330. # time-stamp-start: "timestamp='"
  1331. # time-stamp-format: "%:y-%02m-%02d"
  1332. # time-stamp-end: "'"
  1333. # End: