config.guess 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523
  1. #! /bin/sh
  2. # Attempt to guess a canonical system name.
  3. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
  4. # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
  5. # 2011, 2012 Free Software Foundation, Inc.
  6. timestamp='2012-02-10'
  7. # This file is free software; you can redistribute it and/or modify it
  8. # under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation; either version 2 of the License, or
  10. # (at your option) any later version.
  11. #
  12. # This program is distributed in the hope that it will be useful, but
  13. # WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  15. # General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU General Public License
  18. # along with this program; if not, see <http://www.gnu.org/licenses/>.
  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. # Originally written by Per Bothner. Please send patches (context
  25. # diff format) to <[email protected]> and include a ChangeLog
  26. # entry.
  27. #
  28. # This script attempts to guess a canonical system name similar to
  29. # config.sub. If it succeeds, it prints the system name on stdout, and
  30. # exits with 0. Otherwise, it exits with 1.
  31. #
  32. # You can get the latest version of this script from:
  33. # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
  34. me=`echo "$0" | sed -e 's,.*/,,'`
  35. usage="\
  36. Usage: $0 [OPTION]
  37. Output the configuration name of the system \`$me' is run on.
  38. Operation modes:
  39. -h, --help print this help, then exit
  40. -t, --time-stamp print date of last modification, then exit
  41. -v, --version print version number, then exit
  42. Report bugs and patches to <[email protected]>."
  43. version="\
  44. GNU config.guess ($timestamp)
  45. Originally written by Per Bothner.
  46. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
  47. 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
  48. Free Software Foundation, Inc.
  49. This is free software; see the source for copying conditions. There is NO
  50. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
  51. help="
  52. Try \`$me --help' for more information."
  53. # Parse command line
  54. while test $# -gt 0 ; do
  55. case $1 in
  56. --time-stamp | --time* | -t )
  57. echo "$timestamp" ; exit ;;
  58. --version | -v )
  59. echo "$version" ; exit ;;
  60. --help | --h* | -h )
  61. echo "$usage"; exit ;;
  62. -- ) # Stop option processing
  63. shift; break ;;
  64. - ) # Use stdin as input.
  65. break ;;
  66. -* )
  67. echo "$me: invalid option $1$help" >&2
  68. exit 1 ;;
  69. * )
  70. break ;;
  71. esac
  72. done
  73. if test $# != 0; then
  74. echo "$me: too many arguments$help" >&2
  75. exit 1
  76. fi
  77. trap 'exit 1' 1 2 15
  78. # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
  79. # compiler to aid in system detection is discouraged as it requires
  80. # temporary files to be created and, as you can see below, it is a
  81. # headache to deal with in a portable fashion.
  82. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
  83. # use `HOST_CC' if defined, but it is deprecated.
  84. # Portable tmp directory creation inspired by the Autoconf team.
  85. set_cc_for_build='
  86. trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
  87. trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
  88. : ${TMPDIR=/tmp} ;
  89. { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
  90. { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
  91. { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
  92. { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
  93. dummy=$tmp/dummy ;
  94. tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
  95. case $CC_FOR_BUILD,$HOST_CC,$CC in
  96. ,,) echo "int x;" > $dummy.c ;
  97. for c in cc gcc c89 c99 ; do
  98. if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
  99. CC_FOR_BUILD="$c"; break ;
  100. fi ;
  101. done ;
  102. if test x"$CC_FOR_BUILD" = x ; then
  103. CC_FOR_BUILD=no_compiler_found ;
  104. fi
  105. ;;
  106. ,,*) CC_FOR_BUILD=$CC ;;
  107. ,*,*) CC_FOR_BUILD=$HOST_CC ;;
  108. esac ; set_cc_for_build= ;'
  109. # This is needed to find uname on a Pyramid OSx when run in the BSD universe.
  110. # ([email protected] 1994-08-24)
  111. if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
  112. PATH=$PATH:/.attbin ; export PATH
  113. fi
  114. UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
  115. UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
  116. UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
  117. UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
  118. # Note: order is significant - the case branches are not exclusive.
  119. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
  120. *:NetBSD:*:*)
  121. # NetBSD (nbsd) targets should (where applicable) match one or
  122. # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
  123. # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
  124. # switched to ELF, *-*-netbsd* would select the old
  125. # object file format. This provides both forward
  126. # compatibility and a consistent mechanism for selecting the
  127. # object file format.
  128. #
  129. # Note: NetBSD doesn't particularly care about the vendor
  130. # portion of the name. We always set it to "unknown".
  131. sysctl="sysctl -n hw.machine_arch"
  132. UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
  133. /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
  134. case "${UNAME_MACHINE_ARCH}" in
  135. armeb) machine=armeb-unknown ;;
  136. arm*) machine=arm-unknown ;;
  137. sh3el) machine=shl-unknown ;;
  138. sh3eb) machine=sh-unknown ;;
  139. sh5el) machine=sh5le-unknown ;;
  140. *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
  141. esac
  142. # The Operating System including object format, if it has switched
  143. # to ELF recently, or will in the future.
  144. case "${UNAME_MACHINE_ARCH}" in
  145. arm*|i386|m68k|ns32k|sh3*|sparc|vax)
  146. eval $set_cc_for_build
  147. if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
  148. | grep -q __ELF__
  149. then
  150. # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
  151. # Return netbsd for either. FIX?
  152. os=netbsd
  153. else
  154. os=netbsdelf
  155. fi
  156. ;;
  157. *)
  158. os=netbsd
  159. ;;
  160. esac
  161. # The OS release
  162. # Debian GNU/NetBSD machines have a different userland, and
  163. # thus, need a distinct triplet. However, they do not need
  164. # kernel version information, so it can be replaced with a
  165. # suitable tag, in the style of linux-gnu.
  166. case "${UNAME_VERSION}" in
  167. Debian*)
  168. release='-gnu'
  169. ;;
  170. *)
  171. release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
  172. ;;
  173. esac
  174. # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
  175. # contains redundant information, the shorter form:
  176. # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
  177. echo "${machine}-${os}${release}"
  178. exit ;;
  179. *:OpenBSD:*:*)
  180. UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
  181. echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
  182. exit ;;
  183. *:ekkoBSD:*:*)
  184. echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
  185. exit ;;
  186. *:SolidBSD:*:*)
  187. echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
  188. exit ;;
  189. macppc:MirBSD:*:*)
  190. echo powerpc-unknown-mirbsd${UNAME_RELEASE}
  191. exit ;;
  192. *:MirBSD:*:*)
  193. echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
  194. exit ;;
  195. alpha:OSF1:*:*)
  196. case $UNAME_RELEASE in
  197. *4.0)
  198. UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
  199. ;;
  200. *5.*)
  201. UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
  202. ;;
  203. esac
  204. # According to Compaq, /usr/sbin/psrinfo has been available on
  205. # OSF/1 and Tru64 systems produced since 1995. I hope that
  206. # covers most systems running today. This code pipes the CPU
  207. # types through head -n 1, so we only detect the type of CPU 0.
  208. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
  209. case "$ALPHA_CPU_TYPE" in
  210. "EV4 (21064)")
  211. UNAME_MACHINE="alpha" ;;
  212. "EV4.5 (21064)")
  213. UNAME_MACHINE="alpha" ;;
  214. "LCA4 (21066/21068)")
  215. UNAME_MACHINE="alpha" ;;
  216. "EV5 (21164)")
  217. UNAME_MACHINE="alphaev5" ;;
  218. "EV5.6 (21164A)")
  219. UNAME_MACHINE="alphaev56" ;;
  220. "EV5.6 (21164PC)")
  221. UNAME_MACHINE="alphapca56" ;;
  222. "EV5.7 (21164PC)")
  223. UNAME_MACHINE="alphapca57" ;;
  224. "EV6 (21264)")
  225. UNAME_MACHINE="alphaev6" ;;
  226. "EV6.7 (21264A)")
  227. UNAME_MACHINE="alphaev67" ;;
  228. "EV6.8CB (21264C)")
  229. UNAME_MACHINE="alphaev68" ;;
  230. "EV6.8AL (21264B)")
  231. UNAME_MACHINE="alphaev68" ;;
  232. "EV6.8CX (21264D)")
  233. UNAME_MACHINE="alphaev68" ;;
  234. "EV6.9A (21264/EV69A)")
  235. UNAME_MACHINE="alphaev69" ;;
  236. "EV7 (21364)")
  237. UNAME_MACHINE="alphaev7" ;;
  238. "EV7.9 (21364A)")
  239. UNAME_MACHINE="alphaev79" ;;
  240. esac
  241. # A Pn.n version is a patched version.
  242. # A Vn.n version is a released version.
  243. # A Tn.n version is a released field test version.
  244. # A Xn.n version is an unreleased experimental baselevel.
  245. # 1.2 uses "1.2" for uname -r.
  246. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  247. # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
  248. exitcode=$?
  249. trap '' 0
  250. exit $exitcode ;;
  251. Alpha\ *:Windows_NT*:*)
  252. # How do we know it's Interix rather than the generic POSIX subsystem?
  253. # Should we change UNAME_MACHINE based on the output of uname instead
  254. # of the specific Alpha model?
  255. echo alpha-pc-interix
  256. exit ;;
  257. 21064:Windows_NT:50:3)
  258. echo alpha-dec-winnt3.5
  259. exit ;;
  260. Amiga*:UNIX_System_V:4.0:*)
  261. echo m68k-unknown-sysv4
  262. exit ;;
  263. *:[Aa]miga[Oo][Ss]:*:*)
  264. echo ${UNAME_MACHINE}-unknown-amigaos
  265. exit ;;
  266. *:[Mm]orph[Oo][Ss]:*:*)
  267. echo ${UNAME_MACHINE}-unknown-morphos
  268. exit ;;
  269. *:OS/390:*:*)
  270. echo i370-ibm-openedition
  271. exit ;;
  272. *:z/VM:*:*)
  273. echo s390-ibm-zvmoe
  274. exit ;;
  275. *:OS400:*:*)
  276. echo powerpc-ibm-os400
  277. exit ;;
  278. arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
  279. echo arm-acorn-riscix${UNAME_RELEASE}
  280. exit ;;
  281. arm:riscos:*:*|arm:RISCOS:*:*)
  282. echo arm-unknown-riscos
  283. exit ;;
  284. SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
  285. echo hppa1.1-hitachi-hiuxmpp
  286. exit ;;
  287. Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
  288. # [email protected] (Earle F. Ake) contributed MIS and NILE.
  289. if test "`(/bin/universe) 2>/dev/null`" = att ; then
  290. echo pyramid-pyramid-sysv3
  291. else
  292. echo pyramid-pyramid-bsd
  293. fi
  294. exit ;;
  295. NILE*:*:*:dcosx)
  296. echo pyramid-pyramid-svr4
  297. exit ;;
  298. DRS?6000:unix:4.0:6*)
  299. echo sparc-icl-nx6
  300. exit ;;
  301. DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
  302. case `/usr/bin/uname -p` in
  303. sparc) echo sparc-icl-nx7; exit ;;
  304. esac ;;
  305. s390x:SunOS:*:*)
  306. echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  307. exit ;;
  308. sun4H:SunOS:5.*:*)
  309. echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  310. exit ;;
  311. sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
  312. echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  313. exit ;;
  314. i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
  315. echo i386-pc-auroraux${UNAME_RELEASE}
  316. exit ;;
  317. i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
  318. eval $set_cc_for_build
  319. SUN_ARCH="i386"
  320. # If there is a compiler, see if it is configured for 64-bit objects.
  321. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
  322. # This test works for both compilers.
  323. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
  324. if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
  325. (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
  326. grep IS_64BIT_ARCH >/dev/null
  327. then
  328. SUN_ARCH="x86_64"
  329. fi
  330. fi
  331. echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  332. exit ;;
  333. sun4*:SunOS:6*:*)
  334. # According to config.sub, this is the proper way to canonicalize
  335. # SunOS6. Hard to guess exactly what SunOS6 will be like, but
  336. # it's likely to be more like Solaris than SunOS4.
  337. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  338. exit ;;
  339. sun4*:SunOS:*:*)
  340. case "`/usr/bin/arch -k`" in
  341. Series*|S4*)
  342. UNAME_RELEASE=`uname -v`
  343. ;;
  344. esac
  345. # Japanese Language versions have a version number like `4.1.3-JL'.
  346. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
  347. exit ;;
  348. sun3*:SunOS:*:*)
  349. echo m68k-sun-sunos${UNAME_RELEASE}
  350. exit ;;
  351. sun*:*:4.2BSD:*)
  352. UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
  353. test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
  354. case "`/bin/arch`" in
  355. sun3)
  356. echo m68k-sun-sunos${UNAME_RELEASE}
  357. ;;
  358. sun4)
  359. echo sparc-sun-sunos${UNAME_RELEASE}
  360. ;;
  361. esac
  362. exit ;;
  363. aushp:SunOS:*:*)
  364. echo sparc-auspex-sunos${UNAME_RELEASE}
  365. exit ;;
  366. # The situation for MiNT is a little confusing. The machine name
  367. # can be virtually everything (everything which is not
  368. # "atarist" or "atariste" at least should have a processor
  369. # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
  370. # to the lowercase version "mint" (or "freemint"). Finally
  371. # the system name "TOS" denotes a system which is actually not
  372. # MiNT. But MiNT is downward compatible to TOS, so this should
  373. # be no problem.
  374. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
  375. echo m68k-atari-mint${UNAME_RELEASE}
  376. exit ;;
  377. atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
  378. echo m68k-atari-mint${UNAME_RELEASE}
  379. exit ;;
  380. *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
  381. echo m68k-atari-mint${UNAME_RELEASE}
  382. exit ;;
  383. milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
  384. echo m68k-milan-mint${UNAME_RELEASE}
  385. exit ;;
  386. hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
  387. echo m68k-hades-mint${UNAME_RELEASE}
  388. exit ;;
  389. *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
  390. echo m68k-unknown-mint${UNAME_RELEASE}
  391. exit ;;
  392. m68k:machten:*:*)
  393. echo m68k-apple-machten${UNAME_RELEASE}
  394. exit ;;
  395. powerpc:machten:*:*)
  396. echo powerpc-apple-machten${UNAME_RELEASE}
  397. exit ;;
  398. RISC*:Mach:*:*)
  399. echo mips-dec-mach_bsd4.3
  400. exit ;;
  401. RISC*:ULTRIX:*:*)
  402. echo mips-dec-ultrix${UNAME_RELEASE}
  403. exit ;;
  404. VAX*:ULTRIX*:*:*)
  405. echo vax-dec-ultrix${UNAME_RELEASE}
  406. exit ;;
  407. 2020:CLIX:*:* | 2430:CLIX:*:*)
  408. echo clipper-intergraph-clix${UNAME_RELEASE}
  409. exit ;;
  410. mips:*:*:UMIPS | mips:*:*:RISCos)
  411. eval $set_cc_for_build
  412. sed 's/^ //' << EOF >$dummy.c
  413. #ifdef __cplusplus
  414. #include <stdio.h> /* for printf() prototype */
  415. int main (int argc, char *argv[]) {
  416. #else
  417. int main (argc, argv) int argc; char *argv[]; {
  418. #endif
  419. #if defined (host_mips) && defined (MIPSEB)
  420. #if defined (SYSTYPE_SYSV)
  421. printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
  422. #endif
  423. #if defined (SYSTYPE_SVR4)
  424. printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
  425. #endif
  426. #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
  427. printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
  428. #endif
  429. #endif
  430. exit (-1);
  431. }
  432. EOF
  433. $CC_FOR_BUILD -o $dummy $dummy.c &&
  434. dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
  435. SYSTEM_NAME=`$dummy $dummyarg` &&
  436. { echo "$SYSTEM_NAME"; exit; }
  437. echo mips-mips-riscos${UNAME_RELEASE}
  438. exit ;;
  439. Motorola:PowerMAX_OS:*:*)
  440. echo powerpc-motorola-powermax
  441. exit ;;
  442. Motorola:*:4.3:PL8-*)
  443. echo powerpc-harris-powermax
  444. exit ;;
  445. Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
  446. echo powerpc-harris-powermax
  447. exit ;;
  448. Night_Hawk:Power_UNIX:*:*)
  449. echo powerpc-harris-powerunix
  450. exit ;;
  451. m88k:CX/UX:7*:*)
  452. echo m88k-harris-cxux7
  453. exit ;;
  454. m88k:*:4*:R4*)
  455. echo m88k-motorola-sysv4
  456. exit ;;
  457. m88k:*:3*:R3*)
  458. echo m88k-motorola-sysv3
  459. exit ;;
  460. AViiON:dgux:*:*)
  461. # DG/UX returns AViiON for all architectures
  462. UNAME_PROCESSOR=`/usr/bin/uname -p`
  463. if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
  464. then
  465. if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
  466. [ ${TARGET_BINARY_INTERFACE}x = x ]
  467. then
  468. echo m88k-dg-dgux${UNAME_RELEASE}
  469. else
  470. echo m88k-dg-dguxbcs${UNAME_RELEASE}
  471. fi
  472. else
  473. echo i586-dg-dgux${UNAME_RELEASE}
  474. fi
  475. exit ;;
  476. M88*:DolphinOS:*:*) # DolphinOS (SVR3)
  477. echo m88k-dolphin-sysv3
  478. exit ;;
  479. M88*:*:R3*:*)
  480. # Delta 88k system running SVR3
  481. echo m88k-motorola-sysv3
  482. exit ;;
  483. XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
  484. echo m88k-tektronix-sysv3
  485. exit ;;
  486. Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
  487. echo m68k-tektronix-bsd
  488. exit ;;
  489. *:IRIX*:*:*)
  490. echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
  491. exit ;;
  492. ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
  493. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
  494. exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
  495. i*86:AIX:*:*)
  496. echo i386-ibm-aix
  497. exit ;;
  498. ia64:AIX:*:*)
  499. if [ -x /usr/bin/oslevel ] ; then
  500. IBM_REV=`/usr/bin/oslevel`
  501. else
  502. IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
  503. fi
  504. echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
  505. exit ;;
  506. *:AIX:2:3)
  507. if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
  508. eval $set_cc_for_build
  509. sed 's/^ //' << EOF >$dummy.c
  510. #include <sys/systemcfg.h>
  511. main()
  512. {
  513. if (!__power_pc())
  514. exit(1);
  515. puts("powerpc-ibm-aix3.2.5");
  516. exit(0);
  517. }
  518. EOF
  519. if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
  520. then
  521. echo "$SYSTEM_NAME"
  522. else
  523. echo rs6000-ibm-aix3.2.5
  524. fi
  525. elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
  526. echo rs6000-ibm-aix3.2.4
  527. else
  528. echo rs6000-ibm-aix3.2
  529. fi
  530. exit ;;
  531. *:AIX:*:[4567])
  532. IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
  533. if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
  534. IBM_ARCH=rs6000
  535. else
  536. IBM_ARCH=powerpc
  537. fi
  538. if [ -x /usr/bin/oslevel ] ; then
  539. IBM_REV=`/usr/bin/oslevel`
  540. else
  541. IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
  542. fi
  543. echo ${IBM_ARCH}-ibm-aix${IBM_REV}
  544. exit ;;
  545. *:AIX:*:*)
  546. echo rs6000-ibm-aix
  547. exit ;;
  548. ibmrt:4.4BSD:*|romp-ibm:BSD:*)
  549. echo romp-ibm-bsd4.4
  550. exit ;;
  551. ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
  552. echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
  553. exit ;; # report: romp-ibm BSD 4.3
  554. *:BOSX:*:*)
  555. echo rs6000-bull-bosx
  556. exit ;;
  557. DPX/2?00:B.O.S.:*:*)
  558. echo m68k-bull-sysv3
  559. exit ;;
  560. 9000/[34]??:4.3bsd:1.*:*)
  561. echo m68k-hp-bsd
  562. exit ;;
  563. hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
  564. echo m68k-hp-bsd4.4
  565. exit ;;
  566. 9000/[34678]??:HP-UX:*:*)
  567. HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
  568. case "${UNAME_MACHINE}" in
  569. 9000/31? ) HP_ARCH=m68000 ;;
  570. 9000/[34]?? ) HP_ARCH=m68k ;;
  571. 9000/[678][0-9][0-9])
  572. if [ -x /usr/bin/getconf ]; then
  573. sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
  574. sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
  575. case "${sc_cpu_version}" in
  576. 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
  577. 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
  578. 532) # CPU_PA_RISC2_0
  579. case "${sc_kernel_bits}" in
  580. 32) HP_ARCH="hppa2.0n" ;;
  581. 64) HP_ARCH="hppa2.0w" ;;
  582. '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
  583. esac ;;
  584. esac
  585. fi
  586. if [ "${HP_ARCH}" = "" ]; then
  587. eval $set_cc_for_build
  588. sed 's/^ //' << EOF >$dummy.c
  589. #define _HPUX_SOURCE
  590. #include <stdlib.h>
  591. #include <unistd.h>
  592. int main ()
  593. {
  594. #if defined(_SC_KERNEL_BITS)
  595. long bits = sysconf(_SC_KERNEL_BITS);
  596. #endif
  597. long cpu = sysconf (_SC_CPU_VERSION);
  598. switch (cpu)
  599. {
  600. case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
  601. case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
  602. case CPU_PA_RISC2_0:
  603. #if defined(_SC_KERNEL_BITS)
  604. switch (bits)
  605. {
  606. case 64: puts ("hppa2.0w"); break;
  607. case 32: puts ("hppa2.0n"); break;
  608. default: puts ("hppa2.0"); break;
  609. } break;
  610. #else /* !defined(_SC_KERNEL_BITS) */
  611. puts ("hppa2.0"); break;
  612. #endif
  613. default: puts ("hppa1.0"); break;
  614. }
  615. exit (0);
  616. }
  617. EOF
  618. (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
  619. test -z "$HP_ARCH" && HP_ARCH=hppa
  620. fi ;;
  621. esac
  622. if [ ${HP_ARCH} = "hppa2.0w" ]
  623. then
  624. eval $set_cc_for_build
  625. # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
  626. # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
  627. # generating 64-bit code. GNU and HP use different nomenclature:
  628. #
  629. # $ CC_FOR_BUILD=cc ./config.guess
  630. # => hppa2.0w-hp-hpux11.23
  631. # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
  632. # => hppa64-hp-hpux11.23
  633. if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
  634. grep -q __LP64__
  635. then
  636. HP_ARCH="hppa2.0w"
  637. else
  638. HP_ARCH="hppa64"
  639. fi
  640. fi
  641. echo ${HP_ARCH}-hp-hpux${HPUX_REV}
  642. exit ;;
  643. ia64:HP-UX:*:*)
  644. HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
  645. echo ia64-hp-hpux${HPUX_REV}
  646. exit ;;
  647. 3050*:HI-UX:*:*)
  648. eval $set_cc_for_build
  649. sed 's/^ //' << EOF >$dummy.c
  650. #include <unistd.h>
  651. int
  652. main ()
  653. {
  654. long cpu = sysconf (_SC_CPU_VERSION);
  655. /* The order matters, because CPU_IS_HP_MC68K erroneously returns
  656. true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
  657. results, however. */
  658. if (CPU_IS_PA_RISC (cpu))
  659. {
  660. switch (cpu)
  661. {
  662. case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
  663. case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
  664. case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
  665. default: puts ("hppa-hitachi-hiuxwe2"); break;
  666. }
  667. }
  668. else if (CPU_IS_HP_MC68K (cpu))
  669. puts ("m68k-hitachi-hiuxwe2");
  670. else puts ("unknown-hitachi-hiuxwe2");
  671. exit (0);
  672. }
  673. EOF
  674. $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
  675. { echo "$SYSTEM_NAME"; exit; }
  676. echo unknown-hitachi-hiuxwe2
  677. exit ;;
  678. 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
  679. echo hppa1.1-hp-bsd
  680. exit ;;
  681. 9000/8??:4.3bsd:*:*)
  682. echo hppa1.0-hp-bsd
  683. exit ;;
  684. *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
  685. echo hppa1.0-hp-mpeix
  686. exit ;;
  687. hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
  688. echo hppa1.1-hp-osf
  689. exit ;;
  690. hp8??:OSF1:*:*)
  691. echo hppa1.0-hp-osf
  692. exit ;;
  693. i*86:OSF1:*:*)
  694. if [ -x /usr/sbin/sysversion ] ; then
  695. echo ${UNAME_MACHINE}-unknown-osf1mk
  696. else
  697. echo ${UNAME_MACHINE}-unknown-osf1
  698. fi
  699. exit ;;
  700. parisc*:Lites*:*:*)
  701. echo hppa1.1-hp-lites
  702. exit ;;
  703. C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
  704. echo c1-convex-bsd
  705. exit ;;
  706. C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
  707. if getsysinfo -f scalar_acc
  708. then echo c32-convex-bsd
  709. else echo c2-convex-bsd
  710. fi
  711. exit ;;
  712. C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
  713. echo c34-convex-bsd
  714. exit ;;
  715. C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
  716. echo c38-convex-bsd
  717. exit ;;
  718. C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
  719. echo c4-convex-bsd
  720. exit ;;
  721. CRAY*Y-MP:*:*:*)
  722. echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  723. exit ;;
  724. CRAY*[A-Z]90:*:*:*)
  725. echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
  726. | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
  727. -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
  728. -e 's/\.[^.]*$/.X/'
  729. exit ;;
  730. CRAY*TS:*:*:*)
  731. echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  732. exit ;;
  733. CRAY*T3E:*:*:*)
  734. echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  735. exit ;;
  736. CRAY*SV1:*:*:*)
  737. echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  738. exit ;;
  739. *:UNICOS/mp:*:*)
  740. echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  741. exit ;;
  742. F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
  743. FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  744. FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
  745. FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
  746. echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
  747. exit ;;
  748. 5000:UNIX_System_V:4.*:*)
  749. FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
  750. FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
  751. echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
  752. exit ;;
  753. i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
  754. echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
  755. exit ;;
  756. sparc*:BSD/OS:*:*)
  757. echo sparc-unknown-bsdi${UNAME_RELEASE}
  758. exit ;;
  759. *:BSD/OS:*:*)
  760. echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
  761. exit ;;
  762. *:FreeBSD:*:*)
  763. UNAME_PROCESSOR=`/usr/bin/uname -p`
  764. case ${UNAME_PROCESSOR} in
  765. amd64)
  766. echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
  767. *)
  768. echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
  769. esac
  770. exit ;;
  771. i*:CYGWIN*:*)
  772. echo ${UNAME_MACHINE}-pc-cygwin
  773. exit ;;
  774. *:MINGW*:*)
  775. echo ${UNAME_MACHINE}-pc-mingw32
  776. exit ;;
  777. i*:MSYS*:*)
  778. echo ${UNAME_MACHINE}-pc-msys
  779. exit ;;
  780. i*:windows32*:*)
  781. # uname -m includes "-pc" on this system.
  782. echo ${UNAME_MACHINE}-mingw32
  783. exit ;;
  784. i*:PW*:*)
  785. echo ${UNAME_MACHINE}-pc-pw32
  786. exit ;;
  787. *:Interix*:*)
  788. case ${UNAME_MACHINE} in
  789. x86)
  790. echo i586-pc-interix${UNAME_RELEASE}
  791. exit ;;
  792. authenticamd | genuineintel | EM64T)
  793. echo x86_64-unknown-interix${UNAME_RELEASE}
  794. exit ;;
  795. IA64)
  796. echo ia64-unknown-interix${UNAME_RELEASE}
  797. exit ;;
  798. esac ;;
  799. [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
  800. echo i${UNAME_MACHINE}-pc-mks
  801. exit ;;
  802. 8664:Windows_NT:*)
  803. echo x86_64-pc-mks
  804. exit ;;
  805. i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
  806. # How do we know it's Interix rather than the generic POSIX subsystem?
  807. # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
  808. # UNAME_MACHINE based on the output of uname instead of i386?
  809. echo i586-pc-interix
  810. exit ;;
  811. i*:UWIN*:*)
  812. echo ${UNAME_MACHINE}-pc-uwin
  813. exit ;;
  814. amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
  815. echo x86_64-unknown-cygwin
  816. exit ;;
  817. p*:CYGWIN*:*)
  818. echo powerpcle-unknown-cygwin
  819. exit ;;
  820. prep*:SunOS:5.*:*)
  821. echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  822. exit ;;
  823. *:GNU:*:*)
  824. # the GNU system
  825. echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
  826. exit ;;
  827. *:GNU/*:*:*)
  828. # other systems with GNU libc and userland
  829. echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
  830. exit ;;
  831. i*86:Minix:*:*)
  832. echo ${UNAME_MACHINE}-pc-minix
  833. exit ;;
  834. alpha:Linux:*:*)
  835. case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
  836. EV5) UNAME_MACHINE=alphaev5 ;;
  837. EV56) UNAME_MACHINE=alphaev56 ;;
  838. PCA56) UNAME_MACHINE=alphapca56 ;;
  839. PCA57) UNAME_MACHINE=alphapca56 ;;
  840. EV6) UNAME_MACHINE=alphaev6 ;;
  841. EV67) UNAME_MACHINE=alphaev67 ;;
  842. EV68*) UNAME_MACHINE=alphaev68 ;;
  843. esac
  844. objdump --private-headers /bin/sh | grep -q ld.so.1
  845. if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
  846. echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
  847. exit ;;
  848. arm*:Linux:*:*)
  849. eval $set_cc_for_build
  850. if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
  851. | grep -q __ARM_EABI__
  852. then
  853. echo ${UNAME_MACHINE}-unknown-linux-gnu
  854. else
  855. if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
  856. | grep -q __ARM_PCS_VFP
  857. then
  858. echo ${UNAME_MACHINE}-unknown-linux-gnueabi
  859. else
  860. echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
  861. fi
  862. fi
  863. exit ;;
  864. avr32*:Linux:*:*)
  865. echo ${UNAME_MACHINE}-unknown-linux-gnu
  866. exit ;;
  867. cris:Linux:*:*)
  868. echo ${UNAME_MACHINE}-axis-linux-gnu
  869. exit ;;
  870. crisv32:Linux:*:*)
  871. echo ${UNAME_MACHINE}-axis-linux-gnu
  872. exit ;;
  873. frv:Linux:*:*)
  874. echo ${UNAME_MACHINE}-unknown-linux-gnu
  875. exit ;;
  876. hexagon:Linux:*:*)
  877. echo ${UNAME_MACHINE}-unknown-linux-gnu
  878. exit ;;
  879. i*86:Linux:*:*)
  880. LIBC=gnu
  881. eval $set_cc_for_build
  882. sed 's/^ //' << EOF >$dummy.c
  883. #ifdef __dietlibc__
  884. LIBC=dietlibc
  885. #endif
  886. EOF
  887. eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
  888. echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
  889. exit ;;
  890. ia64:Linux:*:*)
  891. echo ${UNAME_MACHINE}-unknown-linux-gnu
  892. exit ;;
  893. m32r*:Linux:*:*)
  894. echo ${UNAME_MACHINE}-unknown-linux-gnu
  895. exit ;;
  896. m68*:Linux:*:*)
  897. echo ${UNAME_MACHINE}-unknown-linux-gnu
  898. exit ;;
  899. mips:Linux:*:* | mips64:Linux:*:*)
  900. eval $set_cc_for_build
  901. sed 's/^ //' << EOF >$dummy.c
  902. #undef CPU
  903. #undef ${UNAME_MACHINE}
  904. #undef ${UNAME_MACHINE}el
  905. #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
  906. CPU=${UNAME_MACHINE}el
  907. #else
  908. #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
  909. CPU=${UNAME_MACHINE}
  910. #else
  911. CPU=
  912. #endif
  913. #endif
  914. EOF
  915. eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
  916. test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
  917. ;;
  918. or32:Linux:*:*)
  919. echo ${UNAME_MACHINE}-unknown-linux-gnu
  920. exit ;;
  921. padre:Linux:*:*)
  922. echo sparc-unknown-linux-gnu
  923. exit ;;
  924. parisc64:Linux:*:* | hppa64:Linux:*:*)
  925. echo hppa64-unknown-linux-gnu
  926. exit ;;
  927. parisc:Linux:*:* | hppa:Linux:*:*)
  928. # Look for CPU level
  929. case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
  930. PA7*) echo hppa1.1-unknown-linux-gnu ;;
  931. PA8*) echo hppa2.0-unknown-linux-gnu ;;
  932. *) echo hppa-unknown-linux-gnu ;;
  933. esac
  934. exit ;;
  935. ppc64:Linux:*:*)
  936. echo powerpc64-unknown-linux-gnu
  937. exit ;;
  938. ppc:Linux:*:*)
  939. echo powerpc-unknown-linux-gnu
  940. exit ;;
  941. s390:Linux:*:* | s390x:Linux:*:*)
  942. echo ${UNAME_MACHINE}-ibm-linux
  943. exit ;;
  944. sh64*:Linux:*:*)
  945. echo ${UNAME_MACHINE}-unknown-linux-gnu
  946. exit ;;
  947. sh*:Linux:*:*)
  948. echo ${UNAME_MACHINE}-unknown-linux-gnu
  949. exit ;;
  950. sparc:Linux:*:* | sparc64:Linux:*:*)
  951. echo ${UNAME_MACHINE}-unknown-linux-gnu
  952. exit ;;
  953. tile*:Linux:*:*)
  954. echo ${UNAME_MACHINE}-unknown-linux-gnu
  955. exit ;;
  956. vax:Linux:*:*)
  957. echo ${UNAME_MACHINE}-dec-linux-gnu
  958. exit ;;
  959. x86_64:Linux:*:*)
  960. echo ${UNAME_MACHINE}-unknown-linux-gnu
  961. exit ;;
  962. xtensa*:Linux:*:*)
  963. echo ${UNAME_MACHINE}-unknown-linux-gnu
  964. exit ;;
  965. i*86:DYNIX/ptx:4*:*)
  966. # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
  967. # earlier versions are messed up and put the nodename in both
  968. # sysname and nodename.
  969. echo i386-sequent-sysv4
  970. exit ;;
  971. i*86:UNIX_SV:4.2MP:2.*)
  972. # Unixware is an offshoot of SVR4, but it has its own version
  973. # number series starting with 2...
  974. # I am not positive that other SVR4 systems won't match this,
  975. # I just have to hope. -- rms.
  976. # Use sysv4.2uw... so that sysv4* matches it.
  977. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
  978. exit ;;
  979. i*86:OS/2:*:*)
  980. # If we were able to find `uname', then EMX Unix compatibility
  981. # is probably installed.
  982. echo ${UNAME_MACHINE}-pc-os2-emx
  983. exit ;;
  984. i*86:XTS-300:*:STOP)
  985. echo ${UNAME_MACHINE}-unknown-stop
  986. exit ;;
  987. i*86:atheos:*:*)
  988. echo ${UNAME_MACHINE}-unknown-atheos
  989. exit ;;
  990. i*86:syllable:*:*)
  991. echo ${UNAME_MACHINE}-pc-syllable
  992. exit ;;
  993. i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
  994. echo i386-unknown-lynxos${UNAME_RELEASE}
  995. exit ;;
  996. i*86:*DOS:*:*)
  997. echo ${UNAME_MACHINE}-pc-msdosdjgpp
  998. exit ;;
  999. i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
  1000. UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
  1001. if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
  1002. echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
  1003. else
  1004. echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
  1005. fi
  1006. exit ;;
  1007. i*86:*:5:[678]*)
  1008. # UnixWare 7.x, OpenUNIX and OpenServer 6.
  1009. case `/bin/uname -X | grep "^Machine"` in
  1010. *486*) UNAME_MACHINE=i486 ;;
  1011. *Pentium) UNAME_MACHINE=i586 ;;
  1012. *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
  1013. esac
  1014. echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
  1015. exit ;;
  1016. i*86:*:3.2:*)
  1017. if test -f /usr/options/cb.name; then
  1018. UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
  1019. echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
  1020. elif /bin/uname -X 2>/dev/null >/dev/null ; then
  1021. UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
  1022. (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
  1023. (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
  1024. && UNAME_MACHINE=i586
  1025. (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
  1026. && UNAME_MACHINE=i686
  1027. (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
  1028. && UNAME_MACHINE=i686
  1029. echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
  1030. else
  1031. echo ${UNAME_MACHINE}-pc-sysv32
  1032. fi
  1033. exit ;;
  1034. pc:*:*:*)
  1035. # Left here for compatibility:
  1036. # uname -m prints for DJGPP always 'pc', but it prints nothing about
  1037. # the processor, so we play safe by assuming i586.
  1038. # Note: whatever this is, it MUST be the same as what config.sub
  1039. # prints for the "djgpp" host, or else GDB configury will decide that
  1040. # this is a cross-build.
  1041. echo i586-pc-msdosdjgpp
  1042. exit ;;
  1043. Intel:Mach:3*:*)
  1044. echo i386-pc-mach3
  1045. exit ;;
  1046. paragon:*:*:*)
  1047. echo i860-intel-osf1
  1048. exit ;;
  1049. i860:*:4.*:*) # i860-SVR4
  1050. if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
  1051. echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
  1052. else # Add other i860-SVR4 vendors below as they are discovered.
  1053. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
  1054. fi
  1055. exit ;;
  1056. mini*:CTIX:SYS*5:*)
  1057. # "miniframe"
  1058. echo m68010-convergent-sysv
  1059. exit ;;
  1060. mc68k:UNIX:SYSTEM5:3.51m)
  1061. echo m68k-convergent-sysv
  1062. exit ;;
  1063. M680?0:D-NIX:5.3:*)
  1064. echo m68k-diab-dnix
  1065. exit ;;
  1066. M68*:*:R3V[5678]*:*)
  1067. test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
  1068. 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
  1069. OS_REL=''
  1070. test -r /etc/.relid \
  1071. && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
  1072. /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  1073. && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
  1074. /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
  1075. && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
  1076. 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
  1077. /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  1078. && { echo i486-ncr-sysv4; exit; } ;;
  1079. NCR*:*:4.2:* | MPRAS*:*:4.2:*)
  1080. OS_REL='.3'
  1081. test -r /etc/.relid \
  1082. && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
  1083. /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  1084. && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
  1085. /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
  1086. && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
  1087. /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
  1088. && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
  1089. m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
  1090. echo m68k-unknown-lynxos${UNAME_RELEASE}
  1091. exit ;;
  1092. mc68030:UNIX_System_V:4.*:*)
  1093. echo m68k-atari-sysv4
  1094. exit ;;
  1095. TSUNAMI:LynxOS:2.*:*)
  1096. echo sparc-unknown-lynxos${UNAME_RELEASE}
  1097. exit ;;
  1098. rs6000:LynxOS:2.*:*)
  1099. echo rs6000-unknown-lynxos${UNAME_RELEASE}
  1100. exit ;;
  1101. PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
  1102. echo powerpc-unknown-lynxos${UNAME_RELEASE}
  1103. exit ;;
  1104. SM[BE]S:UNIX_SV:*:*)
  1105. echo mips-dde-sysv${UNAME_RELEASE}
  1106. exit ;;
  1107. RM*:ReliantUNIX-*:*:*)
  1108. echo mips-sni-sysv4
  1109. exit ;;
  1110. RM*:SINIX-*:*:*)
  1111. echo mips-sni-sysv4
  1112. exit ;;
  1113. *:SINIX-*:*:*)
  1114. if uname -p 2>/dev/null >/dev/null ; then
  1115. UNAME_MACHINE=`(uname -p) 2>/dev/null`
  1116. echo ${UNAME_MACHINE}-sni-sysv4
  1117. else
  1118. echo ns32k-sni-sysv
  1119. fi
  1120. exit ;;
  1121. PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
  1122. # says <[email protected]>
  1123. echo i586-unisys-sysv4
  1124. exit ;;
  1125. *:UNIX_System_V:4*:FTX*)
  1126. # From Gerald Hewes <[email protected]>.
  1127. # How about differentiating between stratus architectures? -djm
  1128. echo hppa1.1-stratus-sysv4
  1129. exit ;;
  1130. *:*:*:FTX*)
  1131. # From [email protected].
  1132. echo i860-stratus-sysv4
  1133. exit ;;
  1134. i*86:VOS:*:*)
  1135. # From [email protected].
  1136. echo ${UNAME_MACHINE}-stratus-vos
  1137. exit ;;
  1138. *:VOS:*:*)
  1139. # From [email protected].
  1140. echo hppa1.1-stratus-vos
  1141. exit ;;
  1142. mc68*:A/UX:*:*)
  1143. echo m68k-apple-aux${UNAME_RELEASE}
  1144. exit ;;
  1145. news*:NEWS-OS:6*:*)
  1146. echo mips-sony-newsos6
  1147. exit ;;
  1148. R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
  1149. if [ -d /usr/nec ]; then
  1150. echo mips-nec-sysv${UNAME_RELEASE}
  1151. else
  1152. echo mips-unknown-sysv${UNAME_RELEASE}
  1153. fi
  1154. exit ;;
  1155. BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
  1156. echo powerpc-be-beos
  1157. exit ;;
  1158. BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
  1159. echo powerpc-apple-beos
  1160. exit ;;
  1161. BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
  1162. echo i586-pc-beos
  1163. exit ;;
  1164. BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
  1165. echo i586-pc-haiku
  1166. exit ;;
  1167. SX-4:SUPER-UX:*:*)
  1168. echo sx4-nec-superux${UNAME_RELEASE}
  1169. exit ;;
  1170. SX-5:SUPER-UX:*:*)
  1171. echo sx5-nec-superux${UNAME_RELEASE}
  1172. exit ;;
  1173. SX-6:SUPER-UX:*:*)
  1174. echo sx6-nec-superux${UNAME_RELEASE}
  1175. exit ;;
  1176. SX-7:SUPER-UX:*:*)
  1177. echo sx7-nec-superux${UNAME_RELEASE}
  1178. exit ;;
  1179. SX-8:SUPER-UX:*:*)
  1180. echo sx8-nec-superux${UNAME_RELEASE}
  1181. exit ;;
  1182. SX-8R:SUPER-UX:*:*)
  1183. echo sx8r-nec-superux${UNAME_RELEASE}
  1184. exit ;;
  1185. Power*:Rhapsody:*:*)
  1186. echo powerpc-apple-rhapsody${UNAME_RELEASE}
  1187. exit ;;
  1188. *:Rhapsody:*:*)
  1189. echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
  1190. exit ;;
  1191. *:Darwin:*:*)
  1192. UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
  1193. case $UNAME_PROCESSOR in
  1194. i386)
  1195. eval $set_cc_for_build
  1196. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
  1197. if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
  1198. (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
  1199. grep IS_64BIT_ARCH >/dev/null
  1200. then
  1201. UNAME_PROCESSOR="x86_64"
  1202. fi
  1203. fi ;;
  1204. unknown) UNAME_PROCESSOR=powerpc ;;
  1205. esac
  1206. echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
  1207. exit ;;
  1208. *:procnto*:*:* | *:QNX:[0123456789]*:*)
  1209. UNAME_PROCESSOR=`uname -p`
  1210. if test "$UNAME_PROCESSOR" = "x86"; then
  1211. UNAME_PROCESSOR=i386
  1212. UNAME_MACHINE=pc
  1213. fi
  1214. echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
  1215. exit ;;
  1216. *:QNX:*:4*)
  1217. echo i386-pc-qnx
  1218. exit ;;
  1219. NEO-?:NONSTOP_KERNEL:*:*)
  1220. echo neo-tandem-nsk${UNAME_RELEASE}
  1221. exit ;;
  1222. NSE-?:NONSTOP_KERNEL:*:*)
  1223. echo nse-tandem-nsk${UNAME_RELEASE}
  1224. exit ;;
  1225. NSR-?:NONSTOP_KERNEL:*:*)
  1226. echo nsr-tandem-nsk${UNAME_RELEASE}
  1227. exit ;;
  1228. *:NonStop-UX:*:*)
  1229. echo mips-compaq-nonstopux
  1230. exit ;;
  1231. BS2000:POSIX*:*:*)
  1232. echo bs2000-siemens-sysv
  1233. exit ;;
  1234. DS/*:UNIX_System_V:*:*)
  1235. echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
  1236. exit ;;
  1237. *:Plan9:*:*)
  1238. # "uname -m" is not consistent, so use $cputype instead. 386
  1239. # is converted to i386 for consistency with other x86
  1240. # operating systems.
  1241. if test "$cputype" = "386"; then
  1242. UNAME_MACHINE=i386
  1243. else
  1244. UNAME_MACHINE="$cputype"
  1245. fi
  1246. echo ${UNAME_MACHINE}-unknown-plan9
  1247. exit ;;
  1248. *:TOPS-10:*:*)
  1249. echo pdp10-unknown-tops10
  1250. exit ;;
  1251. *:TENEX:*:*)
  1252. echo pdp10-unknown-tenex
  1253. exit ;;
  1254. KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
  1255. echo pdp10-dec-tops20
  1256. exit ;;
  1257. XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
  1258. echo pdp10-xkl-tops20
  1259. exit ;;
  1260. *:TOPS-20:*:*)
  1261. echo pdp10-unknown-tops20
  1262. exit ;;
  1263. *:ITS:*:*)
  1264. echo pdp10-unknown-its
  1265. exit ;;
  1266. SEI:*:*:SEIUX)
  1267. echo mips-sei-seiux${UNAME_RELEASE}
  1268. exit ;;
  1269. *:DragonFly:*:*)
  1270. echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
  1271. exit ;;
  1272. *:*VMS:*:*)
  1273. UNAME_MACHINE=`(uname -p) 2>/dev/null`
  1274. case "${UNAME_MACHINE}" in
  1275. A*) echo alpha-dec-vms ; exit ;;
  1276. I*) echo ia64-dec-vms ; exit ;;
  1277. V*) echo vax-dec-vms ; exit ;;
  1278. esac ;;
  1279. *:XENIX:*:SysV)
  1280. echo i386-pc-xenix
  1281. exit ;;
  1282. i*86:skyos:*:*)
  1283. echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
  1284. exit ;;
  1285. i*86:rdos:*:*)
  1286. echo ${UNAME_MACHINE}-pc-rdos
  1287. exit ;;
  1288. i*86:AROS:*:*)
  1289. echo ${UNAME_MACHINE}-pc-aros
  1290. exit ;;
  1291. x86_64:VMkernel:*:*)
  1292. echo ${UNAME_MACHINE}-unknown-esx
  1293. exit ;;
  1294. esac
  1295. #echo '(No uname command or uname output not recognized.)' 1>&2
  1296. #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
  1297. eval $set_cc_for_build
  1298. cat >$dummy.c <<EOF
  1299. #ifdef _SEQUENT_
  1300. # include <sys/types.h>
  1301. # include <sys/utsname.h>
  1302. #endif
  1303. main ()
  1304. {
  1305. #if defined (sony)
  1306. #if defined (MIPSEB)
  1307. /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
  1308. I don't know.... */
  1309. printf ("mips-sony-bsd\n"); exit (0);
  1310. #else
  1311. #include <sys/param.h>
  1312. printf ("m68k-sony-newsos%s\n",
  1313. #ifdef NEWSOS4
  1314. "4"
  1315. #else
  1316. ""
  1317. #endif
  1318. ); exit (0);
  1319. #endif
  1320. #endif
  1321. #if defined (__arm) && defined (__acorn) && defined (__unix)
  1322. printf ("arm-acorn-riscix\n"); exit (0);
  1323. #endif
  1324. #if defined (hp300) && !defined (hpux)
  1325. printf ("m68k-hp-bsd\n"); exit (0);
  1326. #endif
  1327. #if defined (NeXT)
  1328. #if !defined (__ARCHITECTURE__)
  1329. #define __ARCHITECTURE__ "m68k"
  1330. #endif
  1331. int version;
  1332. version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
  1333. if (version < 4)
  1334. printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
  1335. else
  1336. printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
  1337. exit (0);
  1338. #endif
  1339. #if defined (MULTIMAX) || defined (n16)
  1340. #if defined (UMAXV)
  1341. printf ("ns32k-encore-sysv\n"); exit (0);
  1342. #else
  1343. #if defined (CMU)
  1344. printf ("ns32k-encore-mach\n"); exit (0);
  1345. #else
  1346. printf ("ns32k-encore-bsd\n"); exit (0);
  1347. #endif
  1348. #endif
  1349. #endif
  1350. #if defined (__386BSD__)
  1351. printf ("i386-pc-bsd\n"); exit (0);
  1352. #endif
  1353. #if defined (sequent)
  1354. #if defined (i386)
  1355. printf ("i386-sequent-dynix\n"); exit (0);
  1356. #endif
  1357. #if defined (ns32000)
  1358. printf ("ns32k-sequent-dynix\n"); exit (0);
  1359. #endif
  1360. #endif
  1361. #if defined (_SEQUENT_)
  1362. struct utsname un;
  1363. uname(&un);
  1364. if (strncmp(un.version, "V2", 2) == 0) {
  1365. printf ("i386-sequent-ptx2\n"); exit (0);
  1366. }
  1367. if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
  1368. printf ("i386-sequent-ptx1\n"); exit (0);
  1369. }
  1370. printf ("i386-sequent-ptx\n"); exit (0);
  1371. #endif
  1372. #if defined (vax)
  1373. # if !defined (ultrix)
  1374. # include <sys/param.h>
  1375. # if defined (BSD)
  1376. # if BSD == 43
  1377. printf ("vax-dec-bsd4.3\n"); exit (0);
  1378. # else
  1379. # if BSD == 199006
  1380. printf ("vax-dec-bsd4.3reno\n"); exit (0);
  1381. # else
  1382. printf ("vax-dec-bsd\n"); exit (0);
  1383. # endif
  1384. # endif
  1385. # else
  1386. printf ("vax-dec-bsd\n"); exit (0);
  1387. # endif
  1388. # else
  1389. printf ("vax-dec-ultrix\n"); exit (0);
  1390. # endif
  1391. #endif
  1392. #if defined (alliant) && defined (i860)
  1393. printf ("i860-alliant-bsd\n"); exit (0);
  1394. #endif
  1395. exit (1);
  1396. }
  1397. EOF
  1398. $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
  1399. { echo "$SYSTEM_NAME"; exit; }
  1400. # Apollos put the system type in the environment.
  1401. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
  1402. # Convex versions that predate uname can use getsysinfo(1)
  1403. if [ -x /usr/convex/getsysinfo ]
  1404. then
  1405. case `getsysinfo -f cpu_type` in
  1406. c1*)
  1407. echo c1-convex-bsd
  1408. exit ;;
  1409. c2*)
  1410. if getsysinfo -f scalar_acc
  1411. then echo c32-convex-bsd
  1412. else echo c2-convex-bsd
  1413. fi
  1414. exit ;;
  1415. c34*)
  1416. echo c34-convex-bsd
  1417. exit ;;
  1418. c38*)
  1419. echo c38-convex-bsd
  1420. exit ;;
  1421. c4*)
  1422. echo c4-convex-bsd
  1423. exit ;;
  1424. esac
  1425. fi
  1426. cat >&2 <<EOF
  1427. $0: unable to guess system type
  1428. This script, last modified $timestamp, has failed to recognize
  1429. the operating system you are using. It is advised that you
  1430. download the most up to date version of the config scripts from
  1431. http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
  1432. and
  1433. http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
  1434. If the version you run ($0) is already up to date, please
  1435. send the following data and any information you think might be
  1436. pertinent to <[email protected]> in order to provide the needed
  1437. information to handle your system.
  1438. config.guess timestamp = $timestamp
  1439. uname -m = `(uname -m) 2>/dev/null || echo unknown`
  1440. uname -r = `(uname -r) 2>/dev/null || echo unknown`
  1441. uname -s = `(uname -s) 2>/dev/null || echo unknown`
  1442. uname -v = `(uname -v) 2>/dev/null || echo unknown`
  1443. /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
  1444. /bin/uname -X = `(/bin/uname -X) 2>/dev/null`
  1445. hostinfo = `(hostinfo) 2>/dev/null`
  1446. /bin/universe = `(/bin/universe) 2>/dev/null`
  1447. /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
  1448. /bin/arch = `(/bin/arch) 2>/dev/null`
  1449. /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
  1450. /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
  1451. UNAME_MACHINE = ${UNAME_MACHINE}
  1452. UNAME_RELEASE = ${UNAME_RELEASE}
  1453. UNAME_SYSTEM = ${UNAME_SYSTEM}
  1454. UNAME_VERSION = ${UNAME_VERSION}
  1455. EOF
  1456. exit 1
  1457. # Local variables:
  1458. # eval: (add-hook 'write-file-hooks 'time-stamp)
  1459. # time-stamp-start: "timestamp='"
  1460. # time-stamp-format: "%:y-%02m-%02d"
  1461. # time-stamp-end: "'"
  1462. # End: