config.guess 44 KB

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