config.guess 43 KB

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