config.guess 43 KB

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