config.guess 44 KB

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