config.guess 43 KB

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