config.guess 44 KB

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