config.guess 37 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310
  1. #! /bin/sh
  2. # Attempt to guess a canonical system name.
  3. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
  4. # Free Software Foundation, Inc.
  5. timestamp='2001-09-13'
  6. # This file is free software; you can redistribute it and/or modify it
  7. # under the terms of the GNU General Public License as published by
  8. # the Free Software Foundation; either version 2 of the License, or
  9. # (at your option) any later version.
  10. #
  11. # This program is distributed in the hope that it will be useful, but
  12. # WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. # General Public License for more details.
  15. #
  16. # You should have received a copy of the GNU General Public License
  17. # along with this program; if not, write to the Free Software
  18. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  19. #
  20. # As a special exception to the GNU General Public License, if you
  21. # distribute this file as part of a program that contains a
  22. # configuration script generated by Autoconf, you may include it under
  23. # the same distribution terms that you use for the rest of that program.
  24. # Written by Per Bothner <bothner@cygnus.com>.
  25. # Please send patches to <config-patches@gnu.org>.
  26. #
  27. # This script attempts to guess a canonical system name similar to
  28. # config.sub. If it succeeds, it prints the system name on stdout, and
  29. # exits with 0. Otherwise, it exits with 1.
  30. #
  31. # The plan is that this can be called by configure scripts if you
  32. # don't specify an explicit build system type.
  33. me=`echo "$0" | sed -e 's,.*/,,'`
  34. usage="\
  35. Usage: $0 [OPTION]
  36. Output the configuration name of the system \`$me' is run on.
  37. Operation modes:
  38. -h, --help print this help, then exit
  39. -t, --time-stamp print date of last modification, then exit
  40. -v, --version print version number, then exit
  41. Report bugs and patches to <config-patches@gnu.org>."
  42. version="\
  43. GNU config.guess ($timestamp)
  44. Originally written by Per Bothner.
  45. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
  46. Free Software Foundation, Inc.
  47. This is free software; see the source for copying conditions. There is NO
  48. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
  49. help="
  50. Try \`$me --help' for more information."
  51. # Parse command line
  52. while test $# -gt 0 ; do
  53. case $1 in
  54. --time-stamp | --time* | -t )
  55. echo "$timestamp" ; exit 0 ;;
  56. --version | -v )
  57. echo "$version" ; exit 0 ;;
  58. --help | --h* | -h )
  59. echo "$usage"; exit 0 ;;
  60. -- ) # Stop option processing
  61. shift; break ;;
  62. - ) # Use stdin as input.
  63. break ;;
  64. -* )
  65. echo "$me: invalid option $1$help" >&2
  66. exit 1 ;;
  67. * )
  68. break ;;
  69. esac
  70. done
  71. if test $# != 0; then
  72. echo "$me: too many arguments$help" >&2
  73. exit 1
  74. fi
  75. dummy=dummy-$$
  76. trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
  77. # CC_FOR_BUILD -- compiler used by this script.
  78. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
  79. # use `HOST_CC' if defined, but it is deprecated.
  80. set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
  81. ,,) echo "int dummy(){}" > $dummy.c ;
  82. for c in cc gcc c89 ; do
  83. ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
  84. if test $? = 0 ; then
  85. CC_FOR_BUILD="$c"; break ;
  86. fi ;
  87. done ;
  88. rm -f $dummy.c $dummy.o $dummy.rel ;
  89. if test x"$CC_FOR_BUILD" = x ; then
  90. CC_FOR_BUILD=no_compiler_found ;
  91. fi
  92. ;;
  93. ,,*) CC_FOR_BUILD=$CC ;;
  94. ,*,*) CC_FOR_BUILD=$HOST_CC ;;
  95. esac'
  96. # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
  97. # (ghazi@noc.rutgers.edu 1994-08-24)
  98. if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
  99. PATH=$PATH:/.attbin ; export PATH
  100. fi
  101. UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
  102. UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
  103. UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
  104. UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
  105. # Note: order is significant - the case branches are not exclusive.
  106. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
  107. *:NetBSD:*:*)
  108. # NetBSD (nbsd) targets should (where applicable) match one or
  109. # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
  110. # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
  111. # switched to ELF, *-*-netbsd* would select the old
  112. # object file format. This provides both forward
  113. # compatibility and a consistent mechanism for selecting the
  114. # object file format.
  115. # Determine the machine/vendor (is the vendor relevant).
  116. case "${UNAME_MACHINE}" in
  117. amiga) machine=m68k-unknown ;;
  118. arm32) machine=arm-unknown ;;
  119. atari*) machine=m68k-atari ;;
  120. sun3*) machine=m68k-sun ;;
  121. mac68k) machine=m68k-apple ;;
  122. macppc) machine=powerpc-apple ;;
  123. hp3[0-9][05]) machine=m68k-hp ;;
  124. ibmrt|romp-ibm) machine=romp-ibm ;;
  125. sparc*) machine=`uname -p`-unknown ;;
  126. *) machine=${UNAME_MACHINE}-unknown ;;
  127. esac
  128. # The Operating System including object format, if it has switched
  129. # to ELF recently, or will in the future.
  130. case "${UNAME_MACHINE}" in
  131. i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
  132. eval $set_cc_for_build
  133. if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
  134. | grep __ELF__ >/dev/null
  135. then
  136. # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
  137. # Return netbsd for either. FIX?
  138. os=netbsd
  139. else
  140. os=netbsdelf
  141. fi
  142. ;;
  143. *)
  144. os=netbsd
  145. ;;
  146. esac
  147. # The OS release
  148. release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
  149. # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
  150. # contains redundant information, the shorter form:
  151. # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
  152. echo "${machine}-${os}${release}"
  153. exit 0 ;;
  154. amiga:OpenBSD:*:*)
  155. echo m68k-unknown-openbsd${UNAME_RELEASE}
  156. exit 0 ;;
  157. arc:OpenBSD:*:*)
  158. echo mipsel-unknown-openbsd${UNAME_RELEASE}
  159. exit 0 ;;
  160. hp300:OpenBSD:*:*)
  161. echo m68k-unknown-openbsd${UNAME_RELEASE}
  162. exit 0 ;;
  163. mac68k:OpenBSD:*:*)
  164. echo m68k-unknown-openbsd${UNAME_RELEASE}
  165. exit 0 ;;
  166. macppc:OpenBSD:*:*)
  167. echo powerpc-unknown-openbsd${UNAME_RELEASE}
  168. exit 0 ;;
  169. mvme68k:OpenBSD:*:*)
  170. echo m68k-unknown-openbsd${UNAME_RELEASE}
  171. exit 0 ;;
  172. mvme88k:OpenBSD:*:*)
  173. echo m88k-unknown-openbsd${UNAME_RELEASE}
  174. exit 0 ;;
  175. mvmeppc:OpenBSD:*:*)
  176. echo powerpc-unknown-openbsd${UNAME_RELEASE}
  177. exit 0 ;;
  178. pmax:OpenBSD:*:*)
  179. echo mipsel-unknown-openbsd${UNAME_RELEASE}
  180. exit 0 ;;
  181. sgi:OpenBSD:*:*)
  182. echo mipseb-unknown-openbsd${UNAME_RELEASE}
  183. exit 0 ;;
  184. sun3:OpenBSD:*:*)
  185. echo m68k-unknown-openbsd${UNAME_RELEASE}
  186. exit 0 ;;
  187. wgrisc:OpenBSD:*:*)
  188. echo mipsel-unknown-openbsd${UNAME_RELEASE}
  189. exit 0 ;;
  190. *:OpenBSD:*:*)
  191. echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
  192. exit 0 ;;
  193. alpha:OSF1:*:*)
  194. if test $UNAME_RELEASE = "V4.0"; then
  195. UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
  196. fi
  197. # A Vn.n version is a released version.
  198. # A Tn.n version is a released field test version.
  199. # A Xn.n version is an unreleased experimental baselevel.
  200. # 1.2 uses "1.2" for uname -r.
  201. cat <<EOF >$dummy.s
  202. .data
  203. \$Lformat:
  204. .byte 37,100,45,37,120,10,0 # "%d-%x\n"
  205. .text
  206. .globl main
  207. .align 4
  208. .ent main
  209. main:
  210. .frame \$30,16,\$26,0
  211. ldgp \$29,0(\$27)
  212. .prologue 1
  213. .long 0x47e03d80 # implver \$0
  214. lda \$2,-1
  215. .long 0x47e20c21 # amask \$2,\$1
  216. lda \$16,\$Lformat
  217. mov \$0,\$17
  218. not \$1,\$18
  219. jsr \$26,printf
  220. ldgp \$29,0(\$26)
  221. mov 0,\$16
  222. jsr \$26,exit
  223. .end main
  224. EOF
  225. eval $set_cc_for_build
  226. $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
  227. if test "$?" = 0 ; then
  228. case `./$dummy` in
  229. 0-0)
  230. UNAME_MACHINE="alpha"
  231. ;;
  232. 1-0)
  233. UNAME_MACHINE="alphaev5"
  234. ;;
  235. 1-1)
  236. UNAME_MACHINE="alphaev56"
  237. ;;
  238. 1-101)
  239. UNAME_MACHINE="alphapca56"
  240. ;;
  241. 2-303)
  242. UNAME_MACHINE="alphaev6"
  243. ;;
  244. 2-307)
  245. UNAME_MACHINE="alphaev67"
  246. ;;
  247. 2-1307)
  248. UNAME_MACHINE="alphaev68"
  249. ;;
  250. esac
  251. fi
  252. rm -f $dummy.s $dummy
  253. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  254. exit 0 ;;
  255. Alpha\ *:Windows_NT*:*)
  256. # How do we know it's Interix rather than the generic POSIX subsystem?
  257. # Should we change UNAME_MACHINE based on the output of uname instead
  258. # of the specific Alpha model?
  259. echo alpha-pc-interix
  260. exit 0 ;;
  261. 21064:Windows_NT:50:3)
  262. echo alpha-dec-winnt3.5
  263. exit 0 ;;
  264. Amiga*:UNIX_System_V:4.0:*)
  265. echo m68k-unknown-sysv4
  266. exit 0;;
  267. *:[Aa]miga[Oo][Ss]:*:*)
  268. echo ${UNAME_MACHINE}-unknown-amigaos
  269. exit 0 ;;
  270. *:OS/390:*:*)
  271. echo i370-ibm-openedition
  272. exit 0 ;;
  273. arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
  274. echo arm-acorn-riscix${UNAME_RELEASE}
  275. exit 0;;
  276. SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
  277. echo hppa1.1-hitachi-hiuxmpp
  278. exit 0;;
  279. Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
  280. # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
  281. if test "`(/bin/universe) 2>/dev/null`" = att ; then
  282. echo pyramid-pyramid-sysv3
  283. else
  284. echo pyramid-pyramid-bsd
  285. fi
  286. exit 0 ;;
  287. NILE*:*:*:dcosx)
  288. echo pyramid-pyramid-svr4
  289. exit 0 ;;
  290. sun4H:SunOS:5.*:*)
  291. echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  292. exit 0 ;;
  293. sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
  294. echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  295. exit 0 ;;
  296. i86pc:SunOS:5.*:*)
  297. echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  298. exit 0 ;;
  299. sun4*:SunOS:6*:*)
  300. # According to config.sub, this is the proper way to canonicalize
  301. # SunOS6. Hard to guess exactly what SunOS6 will be like, but
  302. # it's likely to be more like Solaris than SunOS4.
  303. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  304. exit 0 ;;
  305. sun4*:SunOS:*:*)
  306. case "`/usr/bin/arch -k`" in
  307. Series*|S4*)
  308. UNAME_RELEASE=`uname -v`
  309. ;;
  310. esac
  311. # Japanese Language versions have a version number like `4.1.3-JL'.
  312. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
  313. exit 0 ;;
  314. sun3*:SunOS:*:*)
  315. echo m68k-sun-sunos${UNAME_RELEASE}
  316. exit 0 ;;
  317. sun*:*:4.2BSD:*)
  318. UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
  319. test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
  320. case "`/bin/arch`" in
  321. sun3)
  322. echo m68k-sun-sunos${UNAME_RELEASE}
  323. ;;
  324. sun4)
  325. echo sparc-sun-sunos${UNAME_RELEASE}
  326. ;;
  327. esac
  328. exit 0 ;;
  329. aushp:SunOS:*:*)
  330. echo sparc-auspex-sunos${UNAME_RELEASE}
  331. exit 0 ;;
  332. # The situation for MiNT is a little confusing. The machine name
  333. # can be virtually everything (everything which is not
  334. # "atarist" or "atariste" at least should have a processor
  335. # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
  336. # to the lowercase version "mint" (or "freemint"). Finally
  337. # the system name "TOS" denotes a system which is actually not
  338. # MiNT. But MiNT is downward compatible to TOS, so this should
  339. # be no problem.
  340. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
  341. echo m68k-atari-mint${UNAME_RELEASE}
  342. exit 0 ;;
  343. atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
  344. echo m68k-atari-mint${UNAME_RELEASE}
  345. exit 0 ;;
  346. *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
  347. echo m68k-atari-mint${UNAME_RELEASE}
  348. exit 0 ;;
  349. milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
  350. echo m68k-milan-mint${UNAME_RELEASE}
  351. exit 0 ;;
  352. hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
  353. echo m68k-hades-mint${UNAME_RELEASE}
  354. exit 0 ;;
  355. *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
  356. echo m68k-unknown-mint${UNAME_RELEASE}
  357. exit 0 ;;
  358. powerpc:machten:*:*)
  359. echo powerpc-apple-machten${UNAME_RELEASE}
  360. exit 0 ;;
  361. RISC*:Mach:*:*)
  362. echo mips-dec-mach_bsd4.3
  363. exit 0 ;;
  364. RISC*:ULTRIX:*:*)
  365. echo mips-dec-ultrix${UNAME_RELEASE}
  366. exit 0 ;;
  367. VAX*:ULTRIX*:*:*)
  368. echo vax-dec-ultrix${UNAME_RELEASE}
  369. exit 0 ;;
  370. 2020:CLIX:*:* | 2430:CLIX:*:*)
  371. echo clipper-intergraph-clix${UNAME_RELEASE}
  372. exit 0 ;;
  373. mips:*:*:UMIPS | mips:*:*:RISCos)
  374. eval $set_cc_for_build
  375. sed 's/^ //' << EOF >$dummy.c
  376. #ifdef __cplusplus
  377. #include <stdio.h> /* for printf() prototype */
  378. int main (int argc, char *argv[]) {
  379. #else
  380. int main (argc, argv) int argc; char *argv[]; {
  381. #endif
  382. #if defined (host_mips) && defined (MIPSEB)
  383. #if defined (SYSTYPE_SYSV)
  384. printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
  385. #endif
  386. #if defined (SYSTYPE_SVR4)
  387. printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
  388. #endif
  389. #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
  390. printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
  391. #endif
  392. #endif
  393. exit (-1);
  394. }
  395. EOF
  396. $CC_FOR_BUILD $dummy.c -o $dummy \
  397. && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
  398. && rm -f $dummy.c $dummy && exit 0
  399. rm -f $dummy.c $dummy
  400. echo mips-mips-riscos${UNAME_RELEASE}
  401. exit 0 ;;
  402. Motorola:PowerMAX_OS:*:*)
  403. echo powerpc-motorola-powermax
  404. exit 0 ;;
  405. Night_Hawk:Power_UNIX:*:*)
  406. echo powerpc-harris-powerunix
  407. exit 0 ;;
  408. m88k:CX/UX:7*:*)
  409. echo m88k-harris-cxux7
  410. exit 0 ;;
  411. m88k:*:4*:R4*)
  412. echo m88k-motorola-sysv4
  413. exit 0 ;;
  414. m88k:*:3*:R3*)
  415. echo m88k-motorola-sysv3
  416. exit 0 ;;
  417. AViiON:dgux:*:*)
  418. # DG/UX returns AViiON for all architectures
  419. UNAME_PROCESSOR=`/usr/bin/uname -p`
  420. if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
  421. then
  422. if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
  423. [ ${TARGET_BINARY_INTERFACE}x = x ]
  424. then
  425. echo m88k-dg-dgux${UNAME_RELEASE}
  426. else
  427. echo m88k-dg-dguxbcs${UNAME_RELEASE}
  428. fi
  429. else
  430. echo i586-dg-dgux${UNAME_RELEASE}
  431. fi
  432. exit 0 ;;
  433. M88*:DolphinOS:*:*) # DolphinOS (SVR3)
  434. echo m88k-dolphin-sysv3
  435. exit 0 ;;
  436. M88*:*:R3*:*)
  437. # Delta 88k system running SVR3
  438. echo m88k-motorola-sysv3
  439. exit 0 ;;
  440. XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
  441. echo m88k-tektronix-sysv3
  442. exit 0 ;;
  443. Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
  444. echo m68k-tektronix-bsd
  445. exit 0 ;;
  446. *:IRIX*:*:*)
  447. echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
  448. exit 0 ;;
  449. ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
  450. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
  451. exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
  452. i*86:AIX:*:*)
  453. echo i386-ibm-aix
  454. exit 0 ;;
  455. ia64:AIX:*:*)
  456. if [ -x /usr/bin/oslevel ] ; then
  457. IBM_REV=`/usr/bin/oslevel`
  458. else
  459. IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
  460. fi
  461. echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
  462. exit 0 ;;
  463. *:AIX:2:3)
  464. if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
  465. eval $set_cc_for_build
  466. sed 's/^ //' << EOF >$dummy.c
  467. #include <sys/systemcfg.h>
  468. main()
  469. {
  470. if (!__power_pc())
  471. exit(1);
  472. puts("powerpc-ibm-aix3.2.5");
  473. exit(0);
  474. }
  475. EOF
  476. $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
  477. rm -f $dummy.c $dummy
  478. echo rs6000-ibm-aix3.2.5
  479. elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
  480. echo rs6000-ibm-aix3.2.4
  481. else
  482. echo rs6000-ibm-aix3.2
  483. fi
  484. exit 0 ;;
  485. *:AIX:*:[45])
  486. IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
  487. if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
  488. IBM_ARCH=rs6000
  489. else
  490. IBM_ARCH=powerpc
  491. fi
  492. if [ -x /usr/bin/oslevel ] ; then
  493. IBM_REV=`/usr/bin/oslevel`
  494. else
  495. IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
  496. fi
  497. echo ${IBM_ARCH}-ibm-aix${IBM_REV}
  498. exit 0 ;;
  499. *:AIX:*:*)
  500. echo rs6000-ibm-aix
  501. exit 0 ;;
  502. ibmrt:4.4BSD:*|romp-ibm:BSD:*)
  503. echo romp-ibm-bsd4.4
  504. exit 0 ;;
  505. ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
  506. echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
  507. exit 0 ;; # report: romp-ibm BSD 4.3
  508. *:BOSX:*:*)
  509. echo rs6000-bull-bosx
  510. exit 0 ;;
  511. DPX/2?00:B.O.S.:*:*)
  512. echo m68k-bull-sysv3
  513. exit 0 ;;
  514. 9000/[34]??:4.3bsd:1.*:*)
  515. echo m68k-hp-bsd
  516. exit 0 ;;
  517. hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
  518. echo m68k-hp-bsd4.4
  519. exit 0 ;;
  520. 9000/[34678]??:HP-UX:*:*)
  521. HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
  522. case "${UNAME_MACHINE}" in
  523. 9000/31? ) HP_ARCH=m68000 ;;
  524. 9000/[34]?? ) HP_ARCH=m68k ;;
  525. 9000/[678][0-9][0-9])
  526. case "${HPUX_REV}" in
  527. 11.[0-9][0-9])
  528. if [ -x /usr/bin/getconf ]; then
  529. sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
  530. sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
  531. case "${sc_cpu_version}" in
  532. 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
  533. 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
  534. 532) # CPU_PA_RISC2_0
  535. case "${sc_kernel_bits}" in
  536. 32) HP_ARCH="hppa2.0n" ;;
  537. 64) HP_ARCH="hppa2.0w" ;;
  538. esac ;;
  539. esac
  540. fi ;;
  541. esac
  542. if [ "${HP_ARCH}" = "" ]; then
  543. eval $set_cc_for_build
  544. sed 's/^ //' << EOF >$dummy.c
  545. #define _HPUX_SOURCE
  546. #include <stdlib.h>
  547. #include <unistd.h>
  548. int main ()
  549. {
  550. #if defined(_SC_KERNEL_BITS)
  551. long bits = sysconf(_SC_KERNEL_BITS);
  552. #endif
  553. long cpu = sysconf (_SC_CPU_VERSION);
  554. switch (cpu)
  555. {
  556. case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
  557. case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
  558. case CPU_PA_RISC2_0:
  559. #if defined(_SC_KERNEL_BITS)
  560. switch (bits)
  561. {
  562. case 64: puts ("hppa2.0w"); break;
  563. case 32: puts ("hppa2.0n"); break;
  564. default: puts ("hppa2.0"); break;
  565. } break;
  566. #else /* !defined(_SC_KERNEL_BITS) */
  567. puts ("hppa2.0"); break;
  568. #endif
  569. default: puts ("hppa1.0"); break;
  570. }
  571. exit (0);
  572. }
  573. EOF
  574. (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
  575. if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
  576. rm -f $dummy.c $dummy
  577. fi ;;
  578. esac
  579. echo ${HP_ARCH}-hp-hpux${HPUX_REV}
  580. exit 0 ;;
  581. ia64:HP-UX:*:*)
  582. HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
  583. echo ia64-hp-hpux${HPUX_REV}
  584. exit 0 ;;
  585. 3050*:HI-UX:*:*)
  586. eval $set_cc_for_build
  587. sed 's/^ //' << EOF >$dummy.c
  588. #include <unistd.h>
  589. int
  590. main ()
  591. {
  592. long cpu = sysconf (_SC_CPU_VERSION);
  593. /* The order matters, because CPU_IS_HP_MC68K erroneously returns
  594. true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
  595. results, however. */
  596. if (CPU_IS_PA_RISC (cpu))
  597. {
  598. switch (cpu)
  599. {
  600. case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
  601. case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
  602. case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
  603. default: puts ("hppa-hitachi-hiuxwe2"); break;
  604. }
  605. }
  606. else if (CPU_IS_HP_MC68K (cpu))
  607. puts ("m68k-hitachi-hiuxwe2");
  608. else puts ("unknown-hitachi-hiuxwe2");
  609. exit (0);
  610. }
  611. EOF
  612. $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
  613. rm -f $dummy.c $dummy
  614. echo unknown-hitachi-hiuxwe2
  615. exit 0 ;;
  616. 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
  617. echo hppa1.1-hp-bsd
  618. exit 0 ;;
  619. 9000/8??:4.3bsd:*:*)
  620. echo hppa1.0-hp-bsd
  621. exit 0 ;;
  622. *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
  623. echo hppa1.0-hp-mpeix
  624. exit 0 ;;
  625. hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
  626. echo hppa1.1-hp-osf
  627. exit 0 ;;
  628. hp8??:OSF1:*:*)
  629. echo hppa1.0-hp-osf
  630. exit 0 ;;
  631. i*86:OSF1:*:*)
  632. if [ -x /usr/sbin/sysversion ] ; then
  633. echo ${UNAME_MACHINE}-unknown-osf1mk
  634. else
  635. echo ${UNAME_MACHINE}-unknown-osf1
  636. fi
  637. exit 0 ;;
  638. parisc*:Lites*:*:*)
  639. echo hppa1.1-hp-lites
  640. exit 0 ;;
  641. C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
  642. echo c1-convex-bsd
  643. exit 0 ;;
  644. C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
  645. if getsysinfo -f scalar_acc
  646. then echo c32-convex-bsd
  647. else echo c2-convex-bsd
  648. fi
  649. exit 0 ;;
  650. C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
  651. echo c34-convex-bsd
  652. exit 0 ;;
  653. C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
  654. echo c38-convex-bsd
  655. exit 0 ;;
  656. C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
  657. echo c4-convex-bsd
  658. exit 0 ;;
  659. CRAY*X-MP:*:*:*)
  660. echo xmp-cray-unicos
  661. exit 0 ;;
  662. CRAY*Y-MP:*:*:*)
  663. echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  664. exit 0 ;;
  665. CRAY*[A-Z]90:*:*:*)
  666. echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
  667. | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
  668. -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
  669. -e 's/\.[^.]*$/.X/'
  670. exit 0 ;;
  671. CRAY*TS:*:*:*)
  672. echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  673. exit 0 ;;
  674. CRAY*T3D:*:*:*)
  675. echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  676. exit 0 ;;
  677. CRAY*T3E:*:*:*)
  678. echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  679. exit 0 ;;
  680. CRAY*SV1:*:*:*)
  681. echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  682. exit 0 ;;
  683. CRAY-2:*:*:*)
  684. echo cray2-cray-unicos
  685. exit 0 ;;
  686. F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
  687. FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  688. FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
  689. FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
  690. echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
  691. exit 0 ;;
  692. i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
  693. echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
  694. exit 0 ;;
  695. sparc*:BSD/OS:*:*)
  696. echo sparc-unknown-bsdi${UNAME_RELEASE}
  697. exit 0 ;;
  698. *:BSD/OS:*:*)
  699. echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
  700. exit 0 ;;
  701. *:FreeBSD:*:*)
  702. echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
  703. exit 0 ;;
  704. i*:CYGWIN*:*)
  705. echo ${UNAME_MACHINE}-pc-cygwin
  706. exit 0 ;;
  707. i*:MINGW*:*)
  708. echo ${UNAME_MACHINE}-pc-mingw32
  709. exit 0 ;;
  710. i*:PW*:*)
  711. echo ${UNAME_MACHINE}-pc-pw32
  712. exit 0 ;;
  713. i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
  714. # How do we know it's Interix rather than the generic POSIX subsystem?
  715. # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
  716. # UNAME_MACHINE based on the output of uname instead of i386?
  717. echo i386-pc-interix
  718. exit 0 ;;
  719. i*:UWIN*:*)
  720. echo ${UNAME_MACHINE}-pc-uwin
  721. exit 0 ;;
  722. p*:CYGWIN*:*)
  723. echo powerpcle-unknown-cygwin
  724. exit 0 ;;
  725. prep*:SunOS:5.*:*)
  726. echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  727. exit 0 ;;
  728. *:GNU:*:*)
  729. echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
  730. exit 0 ;;
  731. i*86:Minix:*:*)
  732. echo ${UNAME_MACHINE}-pc-minix
  733. exit 0 ;;
  734. arm*:Linux:*:*)
  735. echo ${UNAME_MACHINE}-unknown-linux-gnu
  736. exit 0 ;;
  737. ia64:Linux:*:*)
  738. echo ${UNAME_MACHINE}-unknown-linux
  739. exit 0 ;;
  740. m68*:Linux:*:*)
  741. echo ${UNAME_MACHINE}-unknown-linux-gnu
  742. exit 0 ;;
  743. mips:Linux:*:*)
  744. case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
  745. big) echo mips-unknown-linux-gnu && exit 0 ;;
  746. little) echo mipsel-unknown-linux-gnu && exit 0 ;;
  747. esac
  748. ;;
  749. ppc:Linux:*:*)
  750. echo powerpc-unknown-linux-gnu
  751. exit 0 ;;
  752. ppc64:Linux:*:*)
  753. echo powerpc64-unknown-linux-gnu
  754. exit 0 ;;
  755. alpha:Linux:*:*)
  756. case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
  757. EV5) UNAME_MACHINE=alphaev5 ;;
  758. EV56) UNAME_MACHINE=alphaev56 ;;
  759. PCA56) UNAME_MACHINE=alphapca56 ;;
  760. PCA57) UNAME_MACHINE=alphapca56 ;;
  761. EV6) UNAME_MACHINE=alphaev6 ;;
  762. EV67) UNAME_MACHINE=alphaev67 ;;
  763. EV68*) UNAME_MACHINE=alphaev68 ;;
  764. esac
  765. objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
  766. if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
  767. echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
  768. exit 0 ;;
  769. parisc:Linux:*:* | hppa:Linux:*:*)
  770. # Look for CPU level
  771. case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
  772. PA7*) echo hppa1.1-unknown-linux-gnu ;;
  773. PA8*) echo hppa2.0-unknown-linux-gnu ;;
  774. *) echo hppa-unknown-linux-gnu ;;
  775. esac
  776. exit 0 ;;
  777. parisc64:Linux:*:* | hppa64:Linux:*:*)
  778. echo hppa64-unknown-linux-gnu
  779. exit 0 ;;
  780. s390:Linux:*:* | s390x:Linux:*:*)
  781. echo ${UNAME_MACHINE}-ibm-linux
  782. exit 0 ;;
  783. sh*:Linux:*:*)
  784. echo ${UNAME_MACHINE}-unknown-linux-gnu
  785. exit 0 ;;
  786. sparc:Linux:*:* | sparc64:Linux:*:*)
  787. echo ${UNAME_MACHINE}-unknown-linux-gnu
  788. exit 0 ;;
  789. x86_64:Linux:*:*)
  790. echo x86_64-unknown-linux-gnu
  791. exit 0 ;;
  792. i*86:Linux:*:*)
  793. # The BFD linker knows what the default object file format is, so
  794. # first see if it will tell us. cd to the root directory to prevent
  795. # problems with other programs or directories called `ld' in the path.
  796. ld_supported_targets=`cd /; ld --help 2>&1 \
  797. | sed -ne '/supported targets:/!d
  798. s/[ ][ ]*/ /g
  799. s/.*supported targets: *//
  800. s/ .*//
  801. p'`
  802. case "$ld_supported_targets" in
  803. elf32-i386)
  804. TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
  805. ;;
  806. a.out-i386-linux)
  807. echo "${UNAME_MACHINE}-pc-linux-gnuaout"
  808. exit 0 ;;
  809. coff-i386)
  810. echo "${UNAME_MACHINE}-pc-linux-gnucoff"
  811. exit 0 ;;
  812. "")
  813. # Either a pre-BFD a.out linker (linux-gnuoldld) or
  814. # one that does not give us useful --help.
  815. echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
  816. exit 0 ;;
  817. esac
  818. # Determine whether the default compiler is a.out or elf
  819. eval $set_cc_for_build
  820. cat >$dummy.c <<EOF
  821. #include <features.h>
  822. #ifdef __cplusplus
  823. #include <stdio.h> /* for printf() prototype */
  824. int main (int argc, char *argv[]) {
  825. #else
  826. int main (argc, argv) int argc; char *argv[]; {
  827. #endif
  828. #ifdef __ELF__
  829. # ifdef __GLIBC__
  830. # if __GLIBC__ >= 2
  831. printf ("%s-pc-linux-gnu\n", argv[1]);
  832. # else
  833. printf ("%s-pc-linux-gnulibc1\n", argv[1]);
  834. # endif
  835. # else
  836. printf ("%s-pc-linux-gnulibc1\n", argv[1]);
  837. # endif
  838. #else
  839. printf ("%s-pc-linux-gnuaout\n", argv[1]);
  840. #endif
  841. return 0;
  842. }
  843. EOF
  844. $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
  845. rm -f $dummy.c $dummy
  846. test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
  847. ;;
  848. i*86:DYNIX/ptx:4*:*)
  849. # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
  850. # earlier versions are messed up and put the nodename in both
  851. # sysname and nodename.
  852. echo i386-sequent-sysv4
  853. exit 0 ;;
  854. i*86:UNIX_SV:4.2MP:2.*)
  855. # Unixware is an offshoot of SVR4, but it has its own version
  856. # number series starting with 2...
  857. # I am not positive that other SVR4 systems won't match this,
  858. # I just have to hope. -- rms.
  859. # Use sysv4.2uw... so that sysv4* matches it.
  860. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
  861. exit 0 ;;
  862. i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
  863. UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
  864. if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
  865. echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
  866. else
  867. echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
  868. fi
  869. exit 0 ;;
  870. i*86:*:5:[78]*)
  871. case `/bin/uname -X | grep "^Machine"` in
  872. *486*) UNAME_MACHINE=i486 ;;
  873. *Pentium) UNAME_MACHINE=i586 ;;
  874. *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
  875. esac
  876. echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
  877. exit 0 ;;
  878. i*86:*:3.2:*)
  879. if test -f /usr/options/cb.name; then
  880. UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
  881. echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
  882. elif /bin/uname -X 2>/dev/null >/dev/null ; then
  883. UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
  884. (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
  885. (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
  886. && UNAME_MACHINE=i586
  887. (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
  888. && UNAME_MACHINE=i686
  889. (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
  890. && UNAME_MACHINE=i686
  891. echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
  892. else
  893. echo ${UNAME_MACHINE}-pc-sysv32
  894. fi
  895. exit 0 ;;
  896. i*86:*DOS:*:*)
  897. echo ${UNAME_MACHINE}-pc-msdosdjgpp
  898. exit 0 ;;
  899. pc:*:*:*)
  900. # Left here for compatibility:
  901. # uname -m prints for DJGPP always 'pc', but it prints nothing about
  902. # the processor, so we play safe by assuming i386.
  903. echo i386-pc-msdosdjgpp
  904. exit 0 ;;
  905. Intel:Mach:3*:*)
  906. echo i386-pc-mach3
  907. exit 0 ;;
  908. paragon:*:*:*)
  909. echo i860-intel-osf1
  910. exit 0 ;;
  911. i860:*:4.*:*) # i860-SVR4
  912. if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
  913. echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
  914. else # Add other i860-SVR4 vendors below as they are discovered.
  915. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
  916. fi
  917. exit 0 ;;
  918. mini*:CTIX:SYS*5:*)
  919. # "miniframe"
  920. echo m68010-convergent-sysv
  921. exit 0 ;;
  922. M68*:*:R3V[567]*:*)
  923. test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
  924. 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
  925. OS_REL=''
  926. test -r /etc/.relid \
  927. && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
  928. /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  929. && echo i486-ncr-sysv4.3${OS_REL} && exit 0
  930. /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
  931. && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
  932. 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
  933. /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  934. && echo i486-ncr-sysv4 && exit 0 ;;
  935. m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
  936. echo m68k-unknown-lynxos${UNAME_RELEASE}
  937. exit 0 ;;
  938. mc68030:UNIX_System_V:4.*:*)
  939. echo m68k-atari-sysv4
  940. exit 0 ;;
  941. i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
  942. echo i386-unknown-lynxos${UNAME_RELEASE}
  943. exit 0 ;;
  944. TSUNAMI:LynxOS:2.*:*)
  945. echo sparc-unknown-lynxos${UNAME_RELEASE}
  946. exit 0 ;;
  947. rs6000:LynxOS:2.*:*)
  948. echo rs6000-unknown-lynxos${UNAME_RELEASE}
  949. exit 0 ;;
  950. PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
  951. echo powerpc-unknown-lynxos${UNAME_RELEASE}
  952. exit 0 ;;
  953. SM[BE]S:UNIX_SV:*:*)
  954. echo mips-dde-sysv${UNAME_RELEASE}
  955. exit 0 ;;
  956. RM*:ReliantUNIX-*:*:*)
  957. echo mips-sni-sysv4
  958. exit 0 ;;
  959. RM*:SINIX-*:*:*)
  960. echo mips-sni-sysv4
  961. exit 0 ;;
  962. *:SINIX-*:*:*)
  963. if uname -p 2>/dev/null >/dev/null ; then
  964. UNAME_MACHINE=`(uname -p) 2>/dev/null`
  965. echo ${UNAME_MACHINE}-sni-sysv4
  966. else
  967. echo ns32k-sni-sysv
  968. fi
  969. exit 0 ;;
  970. PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
  971. # says <Richard.M.Bartel@ccMail.Census.GOV>
  972. echo i586-unisys-sysv4
  973. exit 0 ;;
  974. *:UNIX_System_V:4*:FTX*)
  975. # From Gerald Hewes <hewes@openmarket.com>.
  976. # How about differentiating between stratus architectures? -djm
  977. echo hppa1.1-stratus-sysv4
  978. exit 0 ;;
  979. *:*:*:FTX*)
  980. # From seanf@swdc.stratus.com.
  981. echo i860-stratus-sysv4
  982. exit 0 ;;
  983. *:VOS:*:*)
  984. # From Paul.Green@stratus.com.
  985. echo hppa1.1-stratus-vos
  986. exit 0 ;;
  987. mc68*:A/UX:*:*)
  988. echo m68k-apple-aux${UNAME_RELEASE}
  989. exit 0 ;;
  990. news*:NEWS-OS:6*:*)
  991. echo mips-sony-newsos6
  992. exit 0 ;;
  993. R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
  994. if [ -d /usr/nec ]; then
  995. echo mips-nec-sysv${UNAME_RELEASE}
  996. else
  997. echo mips-unknown-sysv${UNAME_RELEASE}
  998. fi
  999. exit 0 ;;
  1000. BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
  1001. echo powerpc-be-beos
  1002. exit 0 ;;
  1003. BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
  1004. echo powerpc-apple-beos
  1005. exit 0 ;;
  1006. BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
  1007. echo i586-pc-beos
  1008. exit 0 ;;
  1009. SX-4:SUPER-UX:*:*)
  1010. echo sx4-nec-superux${UNAME_RELEASE}
  1011. exit 0 ;;
  1012. SX-5:SUPER-UX:*:*)
  1013. echo sx5-nec-superux${UNAME_RELEASE}
  1014. exit 0 ;;
  1015. Power*:Rhapsody:*:*)
  1016. echo powerpc-apple-rhapsody${UNAME_RELEASE}
  1017. exit 0 ;;
  1018. *:Rhapsody:*:*)
  1019. echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
  1020. exit 0 ;;
  1021. *:Darwin:*:*)
  1022. echo `uname -p`-apple-darwin${UNAME_RELEASE}
  1023. exit 0 ;;
  1024. *:procnto*:*:* | *:QNX:[0123456789]*:*)
  1025. if test "${UNAME_MACHINE}" = "x86pc"; then
  1026. UNAME_MACHINE=pc
  1027. fi
  1028. echo `uname -p`-${UNAME_MACHINE}-nto-qnx
  1029. exit 0 ;;
  1030. *:QNX:*:4*)
  1031. echo i386-pc-qnx
  1032. exit 0 ;;
  1033. NSR-[KW]:NONSTOP_KERNEL:*:*)
  1034. echo nsr-tandem-nsk${UNAME_RELEASE}
  1035. exit 0 ;;
  1036. *:NonStop-UX:*:*)
  1037. echo mips-compaq-nonstopux
  1038. exit 0 ;;
  1039. BS2000:POSIX*:*:*)
  1040. echo bs2000-siemens-sysv
  1041. exit 0 ;;
  1042. DS/*:UNIX_System_V:*:*)
  1043. echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
  1044. exit 0 ;;
  1045. *:Plan9:*:*)
  1046. # "uname -m" is not consistent, so use $cputype instead. 386
  1047. # is converted to i386 for consistency with other x86
  1048. # operating systems.
  1049. if test "$cputype" = "386"; then
  1050. UNAME_MACHINE=i386
  1051. else
  1052. UNAME_MACHINE="$cputype"
  1053. fi
  1054. echo ${UNAME_MACHINE}-unknown-plan9
  1055. exit 0 ;;
  1056. i*86:OS/2:*:*)
  1057. # If we were able to find `uname', then EMX Unix compatibility
  1058. # is probably installed.
  1059. echo ${UNAME_MACHINE}-pc-os2-emx
  1060. exit 0 ;;
  1061. *:TOPS-10:*:*)
  1062. echo pdp10-unknown-tops10
  1063. exit 0 ;;
  1064. *:TENEX:*:*)
  1065. echo pdp10-unknown-tenex
  1066. exit 0 ;;
  1067. KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
  1068. echo pdp10-dec-tops20
  1069. exit 0 ;;
  1070. XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
  1071. echo pdp10-xkl-tops20
  1072. exit 0 ;;
  1073. *:TOPS-20:*:*)
  1074. echo pdp10-unknown-tops20
  1075. exit 0 ;;
  1076. *:ITS:*:*)
  1077. echo pdp10-unknown-its
  1078. exit 0 ;;
  1079. i*86:XTS-300:*:STOP)
  1080. echo ${UNAME_MACHINE}-unknown-stop
  1081. exit 0 ;;
  1082. i*86:atheos:*:*)
  1083. echo ${UNAME_MACHINE}-unknown-atheos
  1084. exit 0 ;;
  1085. esac
  1086. #echo '(No uname command or uname output not recognized.)' 1>&2
  1087. #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
  1088. eval $set_cc_for_build
  1089. cat >$dummy.c <<EOF
  1090. #ifdef _SEQUENT_
  1091. # include <sys/types.h>
  1092. # include <sys/utsname.h>
  1093. #endif
  1094. main ()
  1095. {
  1096. #if defined (sony)
  1097. #if defined (MIPSEB)
  1098. /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
  1099. I don't know.... */
  1100. printf ("mips-sony-bsd\n"); exit (0);
  1101. #else
  1102. #include <sys/param.h>
  1103. printf ("m68k-sony-newsos%s\n",
  1104. #ifdef NEWSOS4
  1105. "4"
  1106. #else
  1107. ""
  1108. #endif
  1109. ); exit (0);
  1110. #endif
  1111. #endif
  1112. #if defined (__arm) && defined (__acorn) && defined (__unix)
  1113. printf ("arm-acorn-riscix"); exit (0);
  1114. #endif
  1115. #if defined (hp300) && !defined (hpux)
  1116. printf ("m68k-hp-bsd\n"); exit (0);
  1117. #endif
  1118. #if defined (NeXT)
  1119. #if !defined (__ARCHITECTURE__)
  1120. #define __ARCHITECTURE__ "m68k"
  1121. #endif
  1122. int version;
  1123. version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
  1124. if (version < 4)
  1125. printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
  1126. else
  1127. printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
  1128. exit (0);
  1129. #endif
  1130. #if defined (MULTIMAX) || defined (n16)
  1131. #if defined (UMAXV)
  1132. printf ("ns32k-encore-sysv\n"); exit (0);
  1133. #else
  1134. #if defined (CMU)
  1135. printf ("ns32k-encore-mach\n"); exit (0);
  1136. #else
  1137. printf ("ns32k-encore-bsd\n"); exit (0);
  1138. #endif
  1139. #endif
  1140. #endif
  1141. #if defined (__386BSD__)
  1142. printf ("i386-pc-bsd\n"); exit (0);
  1143. #endif
  1144. #if defined (sequent)
  1145. #if defined (i386)
  1146. printf ("i386-sequent-dynix\n"); exit (0);
  1147. #endif
  1148. #if defined (ns32000)
  1149. printf ("ns32k-sequent-dynix\n"); exit (0);
  1150. #endif
  1151. #endif
  1152. #if defined (_SEQUENT_)
  1153. struct utsname un;
  1154. uname(&un);
  1155. if (strncmp(un.version, "V2", 2) == 0) {
  1156. printf ("i386-sequent-ptx2\n"); exit (0);
  1157. }
  1158. if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
  1159. printf ("i386-sequent-ptx1\n"); exit (0);
  1160. }
  1161. printf ("i386-sequent-ptx\n"); exit (0);
  1162. #endif
  1163. #if defined (vax)
  1164. # if !defined (ultrix)
  1165. # include <sys/param.h>
  1166. # if defined (BSD)
  1167. # if BSD == 43
  1168. printf ("vax-dec-bsd4.3\n"); exit (0);
  1169. # else
  1170. # if BSD == 199006
  1171. printf ("vax-dec-bsd4.3reno\n"); exit (0);
  1172. # else
  1173. printf ("vax-dec-bsd\n"); exit (0);
  1174. # endif
  1175. # endif
  1176. # else
  1177. printf ("vax-dec-bsd\n"); exit (0);
  1178. # endif
  1179. # else
  1180. printf ("vax-dec-ultrix\n"); exit (0);
  1181. # endif
  1182. #endif
  1183. #if defined (alliant) && defined (i860)
  1184. printf ("i860-alliant-bsd\n"); exit (0);
  1185. #endif
  1186. exit (1);
  1187. }
  1188. EOF
  1189. $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
  1190. rm -f $dummy.c $dummy
  1191. # Apollos put the system type in the environment.
  1192. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
  1193. # Convex versions that predate uname can use getsysinfo(1)
  1194. if [ -x /usr/convex/getsysinfo ]
  1195. then
  1196. case `getsysinfo -f cpu_type` in
  1197. c1*)
  1198. echo c1-convex-bsd
  1199. exit 0 ;;
  1200. c2*)
  1201. if getsysinfo -f scalar_acc
  1202. then echo c32-convex-bsd
  1203. else echo c2-convex-bsd
  1204. fi
  1205. exit 0 ;;
  1206. c34*)
  1207. echo c34-convex-bsd
  1208. exit 0 ;;
  1209. c38*)
  1210. echo c38-convex-bsd
  1211. exit 0 ;;
  1212. c4*)
  1213. echo c4-convex-bsd
  1214. exit 0 ;;
  1215. esac
  1216. fi
  1217. cat >&2 <<EOF
  1218. $0: unable to guess system type
  1219. This script, last modified $timestamp, has failed to recognize
  1220. the operating system you are using. It is advised that you
  1221. download the most up to date version of the config scripts from
  1222. ftp://ftp.gnu.org/pub/gnu/config/
  1223. If the version you run ($0) is already up to date, please
  1224. send the following data and any information you think might be
  1225. pertinent to <config-patches@gnu.org> in order to provide the needed
  1226. information to handle your system.
  1227. config.guess timestamp = $timestamp
  1228. uname -m = `(uname -m) 2>/dev/null || echo unknown`
  1229. uname -r = `(uname -r) 2>/dev/null || echo unknown`
  1230. uname -s = `(uname -s) 2>/dev/null || echo unknown`
  1231. uname -v = `(uname -v) 2>/dev/null || echo unknown`
  1232. /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
  1233. /bin/uname -X = `(/bin/uname -X) 2>/dev/null`
  1234. hostinfo = `(hostinfo) 2>/dev/null`
  1235. /bin/universe = `(/bin/universe) 2>/dev/null`
  1236. /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
  1237. /bin/arch = `(/bin/arch) 2>/dev/null`
  1238. /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
  1239. /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
  1240. UNAME_MACHINE = ${UNAME_MACHINE}
  1241. UNAME_RELEASE = ${UNAME_RELEASE}
  1242. UNAME_SYSTEM = ${UNAME_SYSTEM}
  1243. UNAME_VERSION = ${UNAME_VERSION}
  1244. EOF
  1245. exit 1
  1246. # Local variables:
  1247. # eval: (add-hook 'write-file-hooks 'time-stamp)
  1248. # time-stamp-start: "timestamp='"
  1249. # time-stamp-format: "%:y-%02m-%02d"
  1250. # time-stamp-end: "'"
  1251. # End: