config.guess 45 KB

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