config.guess 44 KB

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