You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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