PageRenderTime 46ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/js/lib/Socket.IO-node/support/expresso/deps/jscoverage/js/build/autoconf/config.guess

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