config.guess 44 KB

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