config.guess 44 KB

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