config.guess 43 KB

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