config.guess 44 KB

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