Port of the PCE emulator suite to the 3DS.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

config.guess 44KB

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