config.guess 44 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522
  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-11-11'
  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. UNAME_PROCESSOR=`/usr/bin/uname -p`
  766. case ${UNAME_PROCESSOR} in
  767. amd64)
  768. echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
  769. *)
  770. echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
  771. esac
  772. exit ;;
  773. i*:CYGWIN*:*)
  774. echo ${UNAME_MACHINE}-pc-cygwin
  775. exit ;;
  776. *:MINGW*:*)
  777. echo ${UNAME_MACHINE}-pc-mingw32
  778. exit ;;
  779. i*:MSYS*:*)
  780. echo ${UNAME_MACHINE}-pc-msys
  781. exit ;;
  782. i*:windows32*:*)
  783. # uname -m includes "-pc" on this system.
  784. echo ${UNAME_MACHINE}-mingw32
  785. exit ;;
  786. i*:PW*:*)
  787. echo ${UNAME_MACHINE}-pc-pw32
  788. exit ;;
  789. *:Interix*:*)
  790. case ${UNAME_MACHINE} in
  791. x86)
  792. echo i586-pc-interix${UNAME_RELEASE}
  793. exit ;;
  794. authenticamd | genuineintel | EM64T)
  795. echo x86_64-unknown-interix${UNAME_RELEASE}
  796. exit ;;
  797. IA64)
  798. echo ia64-unknown-interix${UNAME_RELEASE}
  799. exit ;;
  800. esac ;;
  801. [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
  802. echo i${UNAME_MACHINE}-pc-mks
  803. exit ;;
  804. 8664:Windows_NT:*)
  805. echo x86_64-pc-mks
  806. exit ;;
  807. i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
  808. # How do we know it's Interix rather than the generic POSIX subsystem?
  809. # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
  810. # UNAME_MACHINE based on the output of uname instead of i386?
  811. echo i586-pc-interix
  812. exit ;;
  813. i*:UWIN*:*)
  814. echo ${UNAME_MACHINE}-pc-uwin
  815. exit ;;
  816. amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
  817. echo x86_64-unknown-cygwin
  818. exit ;;
  819. p*:CYGWIN*:*)
  820. echo powerpcle-unknown-cygwin
  821. exit ;;
  822. prep*:SunOS:5.*:*)
  823. echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  824. exit ;;
  825. *:GNU:*:*)
  826. # the GNU system
  827. echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
  828. exit ;;
  829. *:GNU/*:*:*)
  830. # other systems with GNU libc and userland
  831. echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
  832. exit ;;
  833. i*86:Minix:*:*)
  834. echo ${UNAME_MACHINE}-pc-minix
  835. exit ;;
  836. alpha:Linux:*:*)
  837. case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
  838. EV5) UNAME_MACHINE=alphaev5 ;;
  839. EV56) UNAME_MACHINE=alphaev56 ;;
  840. PCA56) UNAME_MACHINE=alphapca56 ;;
  841. PCA57) UNAME_MACHINE=alphapca56 ;;
  842. EV6) UNAME_MACHINE=alphaev6 ;;
  843. EV67) UNAME_MACHINE=alphaev67 ;;
  844. EV68*) UNAME_MACHINE=alphaev68 ;;
  845. esac
  846. objdump --private-headers /bin/sh | grep -q ld.so.1
  847. if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
  848. echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
  849. exit ;;
  850. arm*:Linux:*:*)
  851. eval $set_cc_for_build
  852. if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
  853. | grep -q __ARM_EABI__
  854. then
  855. echo ${UNAME_MACHINE}-unknown-linux-gnu
  856. else
  857. if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
  858. | grep -q __ARM_PCS_VFP
  859. then
  860. echo ${UNAME_MACHINE}-unknown-linux-gnueabi
  861. else
  862. echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
  863. fi
  864. fi
  865. exit ;;
  866. avr32*:Linux:*:*)
  867. echo ${UNAME_MACHINE}-unknown-linux-gnu
  868. exit ;;
  869. cris:Linux:*:*)
  870. echo cris-axis-linux-gnu
  871. exit ;;
  872. crisv32:Linux:*:*)
  873. echo crisv32-axis-linux-gnu
  874. exit ;;
  875. frv:Linux:*:*)
  876. echo frv-unknown-linux-gnu
  877. exit ;;
  878. hexagon:Linux:*:*)
  879. echo hexagon-unknown-linux-gnu
  880. exit ;;
  881. i*86:Linux:*:*)
  882. LIBC=gnu
  883. eval $set_cc_for_build
  884. sed 's/^ //' << EOF >$dummy.c
  885. #ifdef __dietlibc__
  886. LIBC=dietlibc
  887. #endif
  888. EOF
  889. eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
  890. echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
  891. exit ;;
  892. ia64:Linux:*:*)
  893. echo ${UNAME_MACHINE}-unknown-linux-gnu
  894. exit ;;
  895. m32r*:Linux:*:*)
  896. echo ${UNAME_MACHINE}-unknown-linux-gnu
  897. exit ;;
  898. m68*:Linux:*:*)
  899. echo ${UNAME_MACHINE}-unknown-linux-gnu
  900. exit ;;
  901. mips:Linux:*:* | mips64:Linux:*:*)
  902. eval $set_cc_for_build
  903. sed 's/^ //' << EOF >$dummy.c
  904. #undef CPU
  905. #undef ${UNAME_MACHINE}
  906. #undef ${UNAME_MACHINE}el
  907. #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
  908. CPU=${UNAME_MACHINE}el
  909. #else
  910. #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
  911. CPU=${UNAME_MACHINE}
  912. #else
  913. CPU=
  914. #endif
  915. #endif
  916. EOF
  917. eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
  918. test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
  919. ;;
  920. or32:Linux:*:*)
  921. echo or32-unknown-linux-gnu
  922. exit ;;
  923. padre:Linux:*:*)
  924. echo sparc-unknown-linux-gnu
  925. exit ;;
  926. parisc64:Linux:*:* | hppa64:Linux:*:*)
  927. echo hppa64-unknown-linux-gnu
  928. exit ;;
  929. parisc:Linux:*:* | hppa:Linux:*:*)
  930. # Look for CPU level
  931. case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
  932. PA7*) echo hppa1.1-unknown-linux-gnu ;;
  933. PA8*) echo hppa2.0-unknown-linux-gnu ;;
  934. *) echo hppa-unknown-linux-gnu ;;
  935. esac
  936. exit ;;
  937. ppc64:Linux:*:*)
  938. echo powerpc64-unknown-linux-gnu
  939. exit ;;
  940. ppc:Linux:*:*)
  941. echo powerpc-unknown-linux-gnu
  942. exit ;;
  943. s390:Linux:*:* | s390x:Linux:*:*)
  944. echo ${UNAME_MACHINE}-ibm-linux
  945. exit ;;
  946. sh64*:Linux:*:*)
  947. echo ${UNAME_MACHINE}-unknown-linux-gnu
  948. exit ;;
  949. sh*:Linux:*:*)
  950. echo ${UNAME_MACHINE}-unknown-linux-gnu
  951. exit ;;
  952. sparc:Linux:*:* | sparc64:Linux:*:*)
  953. echo ${UNAME_MACHINE}-unknown-linux-gnu
  954. exit ;;
  955. tile*:Linux:*:*)
  956. echo ${UNAME_MACHINE}-unknown-linux-gnu
  957. exit ;;
  958. vax:Linux:*:*)
  959. echo ${UNAME_MACHINE}-dec-linux-gnu
  960. exit ;;
  961. x86_64:Linux:*:*)
  962. echo x86_64-unknown-linux-gnu
  963. exit ;;
  964. xtensa*:Linux:*:*)
  965. echo ${UNAME_MACHINE}-unknown-linux-gnu
  966. exit ;;
  967. i*86:DYNIX/ptx:4*:*)
  968. # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
  969. # earlier versions are messed up and put the nodename in both
  970. # sysname and nodename.
  971. echo i386-sequent-sysv4
  972. exit ;;
  973. i*86:UNIX_SV:4.2MP:2.*)
  974. # Unixware is an offshoot of SVR4, but it has its own version
  975. # number series starting with 2...
  976. # I am not positive that other SVR4 systems won't match this,
  977. # I just have to hope. -- rms.
  978. # Use sysv4.2uw... so that sysv4* matches it.
  979. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
  980. exit ;;
  981. i*86:OS/2:*:*)
  982. # If we were able to find `uname', then EMX Unix compatibility
  983. # is probably installed.
  984. echo ${UNAME_MACHINE}-pc-os2-emx
  985. exit ;;
  986. i*86:XTS-300:*:STOP)
  987. echo ${UNAME_MACHINE}-unknown-stop
  988. exit ;;
  989. i*86:atheos:*:*)
  990. echo ${UNAME_MACHINE}-unknown-atheos
  991. exit ;;
  992. i*86:syllable:*:*)
  993. echo ${UNAME_MACHINE}-pc-syllable
  994. exit ;;
  995. i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
  996. echo i386-unknown-lynxos${UNAME_RELEASE}
  997. exit ;;
  998. i*86:*DOS:*:*)
  999. echo ${UNAME_MACHINE}-pc-msdosdjgpp
  1000. exit ;;
  1001. i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
  1002. UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
  1003. if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
  1004. echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
  1005. else
  1006. echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
  1007. fi
  1008. exit ;;
  1009. i*86:*:5:[678]*)
  1010. # UnixWare 7.x, OpenUNIX and OpenServer 6.
  1011. case `/bin/uname -X | grep "^Machine"` in
  1012. *486*) UNAME_MACHINE=i486 ;;
  1013. *Pentium) UNAME_MACHINE=i586 ;;
  1014. *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
  1015. esac
  1016. echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
  1017. exit ;;
  1018. i*86:*:3.2:*)
  1019. if test -f /usr/options/cb.name; then
  1020. UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
  1021. echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
  1022. elif /bin/uname -X 2>/dev/null >/dev/null ; then
  1023. UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
  1024. (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
  1025. (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
  1026. && UNAME_MACHINE=i586
  1027. (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
  1028. && UNAME_MACHINE=i686
  1029. (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
  1030. && UNAME_MACHINE=i686
  1031. echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
  1032. else
  1033. echo ${UNAME_MACHINE}-pc-sysv32
  1034. fi
  1035. exit ;;
  1036. pc:*:*:*)
  1037. # Left here for compatibility:
  1038. # uname -m prints for DJGPP always 'pc', but it prints nothing about
  1039. # the processor, so we play safe by assuming i586.
  1040. # Note: whatever this is, it MUST be the same as what config.sub
  1041. # prints for the "djgpp" host, or else GDB configury will decide that
  1042. # this is a cross-build.
  1043. echo i586-pc-msdosdjgpp
  1044. exit ;;
  1045. Intel:Mach:3*:*)
  1046. echo i386-pc-mach3
  1047. exit ;;
  1048. paragon:*:*:*)
  1049. echo i860-intel-osf1
  1050. exit ;;
  1051. i860:*:4.*:*) # i860-SVR4
  1052. if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
  1053. echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
  1054. else # Add other i860-SVR4 vendors below as they are discovered.
  1055. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
  1056. fi
  1057. exit ;;
  1058. mini*:CTIX:SYS*5:*)
  1059. # "miniframe"
  1060. echo m68010-convergent-sysv
  1061. exit ;;
  1062. mc68k:UNIX:SYSTEM5:3.51m)
  1063. echo m68k-convergent-sysv
  1064. exit ;;
  1065. M680?0:D-NIX:5.3:*)
  1066. echo m68k-diab-dnix
  1067. exit ;;
  1068. M68*:*:R3V[5678]*:*)
  1069. test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
  1070. 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)
  1071. OS_REL=''
  1072. test -r /etc/.relid \
  1073. && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
  1074. /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  1075. && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
  1076. /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
  1077. && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
  1078. 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
  1079. /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  1080. && { echo i486-ncr-sysv4; exit; } ;;
  1081. NCR*:*:4.2:* | MPRAS*:*:4.2:*)
  1082. OS_REL='.3'
  1083. test -r /etc/.relid \
  1084. && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
  1085. /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  1086. && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
  1087. /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
  1088. && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
  1089. /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
  1090. && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
  1091. m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
  1092. echo m68k-unknown-lynxos${UNAME_RELEASE}
  1093. exit ;;
  1094. mc68030:UNIX_System_V:4.*:*)
  1095. echo m68k-atari-sysv4
  1096. exit ;;
  1097. TSUNAMI:LynxOS:2.*:*)
  1098. echo sparc-unknown-lynxos${UNAME_RELEASE}
  1099. exit ;;
  1100. rs6000:LynxOS:2.*:*)
  1101. echo rs6000-unknown-lynxos${UNAME_RELEASE}
  1102. exit ;;
  1103. PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
  1104. echo powerpc-unknown-lynxos${UNAME_RELEASE}
  1105. exit ;;
  1106. SM[BE]S:UNIX_SV:*:*)
  1107. echo mips-dde-sysv${UNAME_RELEASE}
  1108. exit ;;
  1109. RM*:ReliantUNIX-*:*:*)
  1110. echo mips-sni-sysv4
  1111. exit ;;
  1112. RM*:SINIX-*:*:*)
  1113. echo mips-sni-sysv4
  1114. exit ;;
  1115. *:SINIX-*:*:*)
  1116. if uname -p 2>/dev/null >/dev/null ; then
  1117. UNAME_MACHINE=`(uname -p) 2>/dev/null`
  1118. echo ${UNAME_MACHINE}-sni-sysv4
  1119. else
  1120. echo ns32k-sni-sysv
  1121. fi
  1122. exit ;;
  1123. PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
  1124. # says <Richard.M.Bartel@ccMail.Census.GOV>
  1125. echo i586-unisys-sysv4
  1126. exit ;;
  1127. *:UNIX_System_V:4*:FTX*)
  1128. # From Gerald Hewes <hewes@openmarket.com>.
  1129. # How about differentiating between stratus architectures? -djm
  1130. echo hppa1.1-stratus-sysv4
  1131. exit ;;
  1132. *:*:*:FTX*)
  1133. # From seanf@swdc.stratus.com.
  1134. echo i860-stratus-sysv4
  1135. exit ;;
  1136. i*86:VOS:*:*)
  1137. # From Paul.Green@stratus.com.
  1138. echo ${UNAME_MACHINE}-stratus-vos
  1139. exit ;;
  1140. *:VOS:*:*)
  1141. # From Paul.Green@stratus.com.
  1142. echo hppa1.1-stratus-vos
  1143. exit ;;
  1144. mc68*:A/UX:*:*)
  1145. echo m68k-apple-aux${UNAME_RELEASE}
  1146. exit ;;
  1147. news*:NEWS-OS:6*:*)
  1148. echo mips-sony-newsos6
  1149. exit ;;
  1150. R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
  1151. if [ -d /usr/nec ]; then
  1152. echo mips-nec-sysv${UNAME_RELEASE}
  1153. else
  1154. echo mips-unknown-sysv${UNAME_RELEASE}
  1155. fi
  1156. exit ;;
  1157. BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
  1158. echo powerpc-be-beos
  1159. exit ;;
  1160. BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
  1161. echo powerpc-apple-beos
  1162. exit ;;
  1163. BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
  1164. echo i586-pc-beos
  1165. exit ;;
  1166. BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
  1167. echo i586-pc-haiku
  1168. exit ;;
  1169. SX-4:SUPER-UX:*:*)
  1170. echo sx4-nec-superux${UNAME_RELEASE}
  1171. exit ;;
  1172. SX-5:SUPER-UX:*:*)
  1173. echo sx5-nec-superux${UNAME_RELEASE}
  1174. exit ;;
  1175. SX-6:SUPER-UX:*:*)
  1176. echo sx6-nec-superux${UNAME_RELEASE}
  1177. exit ;;
  1178. SX-7:SUPER-UX:*:*)
  1179. echo sx7-nec-superux${UNAME_RELEASE}
  1180. exit ;;
  1181. SX-8:SUPER-UX:*:*)
  1182. echo sx8-nec-superux${UNAME_RELEASE}
  1183. exit ;;
  1184. SX-8R:SUPER-UX:*:*)
  1185. echo sx8r-nec-superux${UNAME_RELEASE}
  1186. exit ;;
  1187. Power*:Rhapsody:*:*)
  1188. echo powerpc-apple-rhapsody${UNAME_RELEASE}
  1189. exit ;;
  1190. *:Rhapsody:*:*)
  1191. echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
  1192. exit ;;
  1193. *:Darwin:*:*)
  1194. UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
  1195. case $UNAME_PROCESSOR in
  1196. i386)
  1197. eval $set_cc_for_build
  1198. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
  1199. if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
  1200. (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
  1201. grep IS_64BIT_ARCH >/dev/null
  1202. then
  1203. UNAME_PROCESSOR="x86_64"
  1204. fi
  1205. fi ;;
  1206. unknown) UNAME_PROCESSOR=powerpc ;;
  1207. esac
  1208. echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
  1209. exit ;;
  1210. *:procnto*:*:* | *:QNX:[0123456789]*:*)
  1211. UNAME_PROCESSOR=`uname -p`
  1212. if test "$UNAME_PROCESSOR" = "x86"; then
  1213. UNAME_PROCESSOR=i386
  1214. UNAME_MACHINE=pc
  1215. fi
  1216. echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
  1217. exit ;;
  1218. *:QNX:*:4*)
  1219. echo i386-pc-qnx
  1220. exit ;;
  1221. NEO-?:NONSTOP_KERNEL:*:*)
  1222. echo neo-tandem-nsk${UNAME_RELEASE}
  1223. exit ;;
  1224. NSE-?:NONSTOP_KERNEL:*:*)
  1225. echo nse-tandem-nsk${UNAME_RELEASE}
  1226. exit ;;
  1227. NSR-?:NONSTOP_KERNEL:*:*)
  1228. echo nsr-tandem-nsk${UNAME_RELEASE}
  1229. exit ;;
  1230. *:NonStop-UX:*:*)
  1231. echo mips-compaq-nonstopux
  1232. exit ;;
  1233. BS2000:POSIX*:*:*)
  1234. echo bs2000-siemens-sysv
  1235. exit ;;
  1236. DS/*:UNIX_System_V:*:*)
  1237. echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
  1238. exit ;;
  1239. *:Plan9:*:*)
  1240. # "uname -m" is not consistent, so use $cputype instead. 386
  1241. # is converted to i386 for consistency with other x86
  1242. # operating systems.
  1243. if test "$cputype" = "386"; then
  1244. UNAME_MACHINE=i386
  1245. else
  1246. UNAME_MACHINE="$cputype"
  1247. fi
  1248. echo ${UNAME_MACHINE}-unknown-plan9
  1249. exit ;;
  1250. *:TOPS-10:*:*)
  1251. echo pdp10-unknown-tops10
  1252. exit ;;
  1253. *:TENEX:*:*)
  1254. echo pdp10-unknown-tenex
  1255. exit ;;
  1256. KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
  1257. echo pdp10-dec-tops20
  1258. exit ;;
  1259. XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
  1260. echo pdp10-xkl-tops20
  1261. exit ;;
  1262. *:TOPS-20:*:*)
  1263. echo pdp10-unknown-tops20
  1264. exit ;;
  1265. *:ITS:*:*)
  1266. echo pdp10-unknown-its
  1267. exit ;;
  1268. SEI:*:*:SEIUX)
  1269. echo mips-sei-seiux${UNAME_RELEASE}
  1270. exit ;;
  1271. *:DragonFly:*:*)
  1272. echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
  1273. exit ;;
  1274. *:*VMS:*:*)
  1275. UNAME_MACHINE=`(uname -p) 2>/dev/null`
  1276. case "${UNAME_MACHINE}" in
  1277. A*) echo alpha-dec-vms ; exit ;;
  1278. I*) echo ia64-dec-vms ; exit ;;
  1279. V*) echo vax-dec-vms ; exit ;;
  1280. esac ;;
  1281. *:XENIX:*:SysV)
  1282. echo i386-pc-xenix
  1283. exit ;;
  1284. i*86:skyos:*:*)
  1285. echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
  1286. exit ;;
  1287. i*86:rdos:*:*)
  1288. echo ${UNAME_MACHINE}-pc-rdos
  1289. exit ;;
  1290. i*86:AROS:*:*)
  1291. echo ${UNAME_MACHINE}-pc-aros
  1292. exit ;;
  1293. esac
  1294. #echo '(No uname command or uname output not recognized.)' 1>&2
  1295. #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
  1296. eval $set_cc_for_build
  1297. cat >$dummy.c <<EOF
  1298. #ifdef _SEQUENT_
  1299. # include <sys/types.h>
  1300. # include <sys/utsname.h>
  1301. #endif
  1302. main ()
  1303. {
  1304. #if defined (sony)
  1305. #if defined (MIPSEB)
  1306. /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
  1307. I don't know.... */
  1308. printf ("mips-sony-bsd\n"); exit (0);
  1309. #else
  1310. #include <sys/param.h>
  1311. printf ("m68k-sony-newsos%s\n",
  1312. #ifdef NEWSOS4
  1313. "4"
  1314. #else
  1315. ""
  1316. #endif
  1317. ); exit (0);
  1318. #endif
  1319. #endif
  1320. #if defined (__arm) && defined (__acorn) && defined (__unix)
  1321. printf ("arm-acorn-riscix\n"); exit (0);
  1322. #endif
  1323. #if defined (hp300) && !defined (hpux)
  1324. printf ("m68k-hp-bsd\n"); exit (0);
  1325. #endif
  1326. #if defined (NeXT)
  1327. #if !defined (__ARCHITECTURE__)
  1328. #define __ARCHITECTURE__ "m68k"
  1329. #endif
  1330. int version;
  1331. version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
  1332. if (version < 4)
  1333. printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
  1334. else
  1335. printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
  1336. exit (0);
  1337. #endif
  1338. #if defined (MULTIMAX) || defined (n16)
  1339. #if defined (UMAXV)
  1340. printf ("ns32k-encore-sysv\n"); exit (0);
  1341. #else
  1342. #if defined (CMU)
  1343. printf ("ns32k-encore-mach\n"); exit (0);
  1344. #else
  1345. printf ("ns32k-encore-bsd\n"); exit (0);
  1346. #endif
  1347. #endif
  1348. #endif
  1349. #if defined (__386BSD__)
  1350. printf ("i386-pc-bsd\n"); exit (0);
  1351. #endif
  1352. #if defined (sequent)
  1353. #if defined (i386)
  1354. printf ("i386-sequent-dynix\n"); exit (0);
  1355. #endif
  1356. #if defined (ns32000)
  1357. printf ("ns32k-sequent-dynix\n"); exit (0);
  1358. #endif
  1359. #endif
  1360. #if defined (_SEQUENT_)
  1361. struct utsname un;
  1362. uname(&un);
  1363. if (strncmp(un.version, "V2", 2) == 0) {
  1364. printf ("i386-sequent-ptx2\n"); exit (0);
  1365. }
  1366. if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
  1367. printf ("i386-sequent-ptx1\n"); exit (0);
  1368. }
  1369. printf ("i386-sequent-ptx\n"); exit (0);
  1370. #endif
  1371. #if defined (vax)
  1372. # if !defined (ultrix)
  1373. # include <sys/param.h>
  1374. # if defined (BSD)
  1375. # if BSD == 43
  1376. printf ("vax-dec-bsd4.3\n"); exit (0);
  1377. # else
  1378. # if BSD == 199006
  1379. printf ("vax-dec-bsd4.3reno\n"); exit (0);
  1380. # else
  1381. printf ("vax-dec-bsd\n"); exit (0);
  1382. # endif
  1383. # endif
  1384. # else
  1385. printf ("vax-dec-bsd\n"); exit (0);
  1386. # endif
  1387. # else
  1388. printf ("vax-dec-ultrix\n"); exit (0);
  1389. # endif
  1390. #endif
  1391. #if defined (alliant) && defined (i860)
  1392. printf ("i860-alliant-bsd\n"); exit (0);
  1393. #endif
  1394. exit (1);
  1395. }
  1396. EOF
  1397. $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
  1398. { echo "$SYSTEM_NAME"; exit; }
  1399. # Apollos put the system type in the environment.
  1400. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
  1401. # Convex versions that predate uname can use getsysinfo(1)
  1402. if [ -x /usr/convex/getsysinfo ]
  1403. then
  1404. case `getsysinfo -f cpu_type` in
  1405. c1*)
  1406. echo c1-convex-bsd
  1407. exit ;;
  1408. c2*)
  1409. if getsysinfo -f scalar_acc
  1410. then echo c32-convex-bsd
  1411. else echo c2-convex-bsd
  1412. fi
  1413. exit ;;
  1414. c34*)
  1415. echo c34-convex-bsd
  1416. exit ;;
  1417. c38*)
  1418. echo c38-convex-bsd
  1419. exit ;;
  1420. c4*)
  1421. echo c4-convex-bsd
  1422. exit ;;
  1423. esac
  1424. fi
  1425. cat >&2 <<EOF
  1426. $0: unable to guess system type
  1427. This script, last modified $timestamp, has failed to recognize
  1428. the operating system you are using. It is advised that you
  1429. download the most up to date version of the config scripts from
  1430. http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
  1431. and
  1432. http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
  1433. If the version you run ($0) is already up to date, please
  1434. send the following data and any information you think might be
  1435. pertinent to <config-patches@gnu.org> in order to provide the needed
  1436. information to handle your system.
  1437. config.guess timestamp = $timestamp
  1438. uname -m = `(uname -m) 2>/dev/null || echo unknown`
  1439. uname -r = `(uname -r) 2>/dev/null || echo unknown`
  1440. uname -s = `(uname -s) 2>/dev/null || echo unknown`
  1441. uname -v = `(uname -v) 2>/dev/null || echo unknown`
  1442. /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
  1443. /bin/uname -X = `(/bin/uname -X) 2>/dev/null`
  1444. hostinfo = `(hostinfo) 2>/dev/null`
  1445. /bin/universe = `(/bin/universe) 2>/dev/null`
  1446. /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
  1447. /bin/arch = `(/bin/arch) 2>/dev/null`
  1448. /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
  1449. /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
  1450. UNAME_MACHINE = ${UNAME_MACHINE}
  1451. UNAME_RELEASE = ${UNAME_RELEASE}
  1452. UNAME_SYSTEM = ${UNAME_SYSTEM}
  1453. UNAME_VERSION = ${UNAME_VERSION}
  1454. EOF
  1455. exit 1
  1456. # Local variables:
  1457. # eval: (add-hook 'write-file-hooks 'time-stamp)
  1458. # time-stamp-start: "timestamp='"
  1459. # time-stamp-format: "%:y-%02m-%02d"
  1460. # time-stamp-end: "'"
  1461. # End: