config.guess 43 KB

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