config.guess 43 KB

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