1
0

config.guess 43 KB

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