patch-lib_libmodplug_config_guess 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990
  1. --- xbmc-imx6-13.2.orig/lib/libmodplug/config.guess 2014-09-02 13:26:18.000000000 +0200
  2. +++ xbmc-imx6-13.2/lib/libmodplug/config.guess 2014-08-18 15:18:32.461397057 +0200
  3. @@ -1,14 +1,12 @@
  4. #! /bin/sh
  5. # Attempt to guess a canonical system name.
  6. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
  7. -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
  8. -# Free Software Foundation, Inc.
  9. +# Copyright 1992-2014 Free Software Foundation, Inc.
  10. -timestamp='2009-06-10'
  11. +timestamp='2014-01-25'
  12. # This file is free software; you can redistribute it and/or modify it
  13. # under the terms of the GNU General Public License as published by
  14. -# the Free Software Foundation; either version 2 of the License, or
  15. +# the Free Software Foundation; either version 3 of the License, or
  16. # (at your option) any later version.
  17. #
  18. # This program is distributed in the hope that it will be useful, but
  19. @@ -17,26 +15,22 @@ timestamp='2009-06-10'
  20. # General Public License for more details.
  21. #
  22. # You should have received a copy of the GNU General Public License
  23. -# along with this program; if not, write to the Free Software
  24. -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
  25. -# 02110-1301, USA.
  26. +# along with this program; if not, see <http://www.gnu.org/licenses/>.
  27. #
  28. # As a special exception to the GNU General Public License, if you
  29. # distribute this file as part of a program that contains a
  30. # configuration script generated by Autoconf, you may include it under
  31. -# the same distribution terms that you use for the rest of that program.
  32. -
  33. -
  34. -# Originally written by Per Bothner <per@bothner.com>.
  35. -# Please send patches to <config-patches@gnu.org>. Submit a context
  36. -# diff and a properly formatted ChangeLog entry.
  37. +# the same distribution terms that you use for the rest of that
  38. +# program. This Exception is an additional permission under section 7
  39. +# of the GNU General Public License, version 3 ("GPLv3").
  40. #
  41. -# This script attempts to guess a canonical system name similar to
  42. -# config.sub. If it succeeds, it prints the system name on stdout, and
  43. -# exits with 0. Otherwise, it exits with 1.
  44. +# Originally written by Per Bothner.
  45. #
  46. -# The plan is that this can be called by configure scripts if you
  47. -# don't specify an explicit build system type.
  48. +# You can get the latest version of this script from:
  49. +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
  50. +#
  51. +# Please send patches with a ChangeLog entry to config-patches@gnu.org.
  52. +
  53. me=`echo "$0" | sed -e 's,.*/,,'`
  54. @@ -56,8 +50,7 @@ version="\
  55. GNU config.guess ($timestamp)
  56. Originally written by Per Bothner.
  57. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
  58. -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
  59. +Copyright 1992-2014 Free Software Foundation, Inc.
  60. This is free software; see the source for copying conditions. There is NO
  61. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
  62. @@ -139,12 +132,33 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` |
  63. UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
  64. UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
  65. +case "${UNAME_SYSTEM}" in
  66. +Linux|GNU|GNU/*)
  67. + # If the system lacks a compiler, then just pick glibc.
  68. + # We could probably try harder.
  69. + LIBC=gnu
  70. +
  71. + eval $set_cc_for_build
  72. + cat <<-EOF > $dummy.c
  73. + #include <features.h>
  74. + #if defined(__UCLIBC__)
  75. + LIBC=uclibc
  76. + #elif defined(__dietlibc__)
  77. + LIBC=dietlibc
  78. + #else
  79. + LIBC=gnu
  80. + #endif
  81. + EOF
  82. + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
  83. + ;;
  84. +esac
  85. +
  86. # Note: order is significant - the case branches are not exclusive.
  87. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
  88. *:NetBSD:*:*)
  89. # NetBSD (nbsd) targets should (where applicable) match one or
  90. - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
  91. + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
  92. # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
  93. # switched to ELF, *-*-netbsd* would select the old
  94. # object file format. This provides both forward
  95. @@ -180,7 +194,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
  96. fi
  97. ;;
  98. *)
  99. - os=netbsd
  100. + os=netbsd
  101. ;;
  102. esac
  103. # The OS release
  104. @@ -201,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
  105. # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
  106. echo "${machine}-${os}${release}"
  107. exit ;;
  108. + *:Bitrig:*:*)
  109. + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
  110. + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
  111. + exit ;;
  112. *:OpenBSD:*:*)
  113. UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
  114. echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
  115. @@ -223,7 +241,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
  116. UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
  117. ;;
  118. *5.*)
  119. - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
  120. + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
  121. ;;
  122. esac
  123. # According to Compaq, /usr/sbin/psrinfo has been available on
  124. @@ -269,7 +287,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
  125. # A Xn.n version is an unreleased experimental baselevel.
  126. # 1.2 uses "1.2" for uname -r.
  127. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  128. - exit ;;
  129. + # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
  130. + exitcode=$?
  131. + trap '' 0
  132. + exit $exitcode ;;
  133. Alpha\ *:Windows_NT*:*)
  134. # How do we know it's Interix rather than the generic POSIX subsystem?
  135. # Should we change UNAME_MACHINE based on the output of uname instead
  136. @@ -295,12 +316,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
  137. echo s390-ibm-zvmoe
  138. exit ;;
  139. *:OS400:*:*)
  140. - echo powerpc-ibm-os400
  141. + echo powerpc-ibm-os400
  142. exit ;;
  143. arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
  144. echo arm-acorn-riscix${UNAME_RELEASE}
  145. exit ;;
  146. - arm:riscos:*:*|arm:RISCOS:*:*)
  147. + arm*:riscos:*:*|arm*:RISCOS:*:*)
  148. echo arm-unknown-riscos
  149. exit ;;
  150. SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
  151. @@ -333,6 +354,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
  152. sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
  153. echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  154. exit ;;
  155. + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
  156. + echo i386-pc-auroraux${UNAME_RELEASE}
  157. + exit ;;
  158. i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
  159. eval $set_cc_for_build
  160. SUN_ARCH="i386"
  161. @@ -391,23 +415,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
  162. # MiNT. But MiNT is downward compatible to TOS, so this should
  163. # be no problem.
  164. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
  165. - echo m68k-atari-mint${UNAME_RELEASE}
  166. + echo m68k-atari-mint${UNAME_RELEASE}
  167. exit ;;
  168. atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
  169. echo m68k-atari-mint${UNAME_RELEASE}
  170. - exit ;;
  171. + exit ;;
  172. *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
  173. - echo m68k-atari-mint${UNAME_RELEASE}
  174. + echo m68k-atari-mint${UNAME_RELEASE}
  175. exit ;;
  176. milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
  177. - echo m68k-milan-mint${UNAME_RELEASE}
  178. - exit ;;
  179. + echo m68k-milan-mint${UNAME_RELEASE}
  180. + exit ;;
  181. hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
  182. - echo m68k-hades-mint${UNAME_RELEASE}
  183. - exit ;;
  184. + echo m68k-hades-mint${UNAME_RELEASE}
  185. + exit ;;
  186. *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
  187. - echo m68k-unknown-mint${UNAME_RELEASE}
  188. - exit ;;
  189. + echo m68k-unknown-mint${UNAME_RELEASE}
  190. + exit ;;
  191. m68k:machten:*:*)
  192. echo m68k-apple-machten${UNAME_RELEASE}
  193. exit ;;
  194. @@ -477,8 +501,8 @@ EOF
  195. echo m88k-motorola-sysv3
  196. exit ;;
  197. AViiON:dgux:*:*)
  198. - # DG/UX returns AViiON for all architectures
  199. - UNAME_PROCESSOR=`/usr/bin/uname -p`
  200. + # DG/UX returns AViiON for all architectures
  201. + UNAME_PROCESSOR=`/usr/bin/uname -p`
  202. if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
  203. then
  204. if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
  205. @@ -491,7 +515,7 @@ EOF
  206. else
  207. echo i586-dg-dgux${UNAME_RELEASE}
  208. fi
  209. - exit ;;
  210. + exit ;;
  211. M88*:DolphinOS:*:*) # DolphinOS (SVR3)
  212. echo m88k-dolphin-sysv3
  213. exit ;;
  214. @@ -548,7 +572,7 @@ EOF
  215. echo rs6000-ibm-aix3.2
  216. fi
  217. exit ;;
  218. - *:AIX:*:[456])
  219. + *:AIX:*:[4567])
  220. IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
  221. if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
  222. IBM_ARCH=rs6000
  223. @@ -591,52 +615,52 @@ EOF
  224. 9000/[678][0-9][0-9])
  225. if [ -x /usr/bin/getconf ]; then
  226. sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
  227. - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
  228. - case "${sc_cpu_version}" in
  229. - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
  230. - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
  231. - 532) # CPU_PA_RISC2_0
  232. - case "${sc_kernel_bits}" in
  233. - 32) HP_ARCH="hppa2.0n" ;;
  234. - 64) HP_ARCH="hppa2.0w" ;;
  235. + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
  236. + case "${sc_cpu_version}" in
  237. + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
  238. + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
  239. + 532) # CPU_PA_RISC2_0
  240. + case "${sc_kernel_bits}" in
  241. + 32) HP_ARCH="hppa2.0n" ;;
  242. + 64) HP_ARCH="hppa2.0w" ;;
  243. '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
  244. - esac ;;
  245. - esac
  246. + esac ;;
  247. + esac
  248. fi
  249. if [ "${HP_ARCH}" = "" ]; then
  250. eval $set_cc_for_build
  251. - sed 's/^ //' << EOF >$dummy.c
  252. + sed 's/^ //' << EOF >$dummy.c
  253. - #define _HPUX_SOURCE
  254. - #include <stdlib.h>
  255. - #include <unistd.h>
  256. + #define _HPUX_SOURCE
  257. + #include <stdlib.h>
  258. + #include <unistd.h>
  259. - int main ()
  260. - {
  261. - #if defined(_SC_KERNEL_BITS)
  262. - long bits = sysconf(_SC_KERNEL_BITS);
  263. - #endif
  264. - long cpu = sysconf (_SC_CPU_VERSION);
  265. + int main ()
  266. + {
  267. + #if defined(_SC_KERNEL_BITS)
  268. + long bits = sysconf(_SC_KERNEL_BITS);
  269. + #endif
  270. + long cpu = sysconf (_SC_CPU_VERSION);
  271. - switch (cpu)
  272. - {
  273. - case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
  274. - case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
  275. - case CPU_PA_RISC2_0:
  276. - #if defined(_SC_KERNEL_BITS)
  277. - switch (bits)
  278. - {
  279. - case 64: puts ("hppa2.0w"); break;
  280. - case 32: puts ("hppa2.0n"); break;
  281. - default: puts ("hppa2.0"); break;
  282. - } break;
  283. - #else /* !defined(_SC_KERNEL_BITS) */
  284. - puts ("hppa2.0"); break;
  285. - #endif
  286. - default: puts ("hppa1.0"); break;
  287. - }
  288. - exit (0);
  289. - }
  290. + switch (cpu)
  291. + {
  292. + case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
  293. + case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
  294. + case CPU_PA_RISC2_0:
  295. + #if defined(_SC_KERNEL_BITS)
  296. + switch (bits)
  297. + {
  298. + case 64: puts ("hppa2.0w"); break;
  299. + case 32: puts ("hppa2.0n"); break;
  300. + default: puts ("hppa2.0"); break;
  301. + } break;
  302. + #else /* !defined(_SC_KERNEL_BITS) */
  303. + puts ("hppa2.0"); break;
  304. + #endif
  305. + default: puts ("hppa1.0"); break;
  306. + }
  307. + exit (0);
  308. + }
  309. EOF
  310. (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
  311. test -z "$HP_ARCH" && HP_ARCH=hppa
  312. @@ -727,22 +751,22 @@ EOF
  313. exit ;;
  314. C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
  315. echo c1-convex-bsd
  316. - exit ;;
  317. + exit ;;
  318. C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
  319. if getsysinfo -f scalar_acc
  320. then echo c32-convex-bsd
  321. else echo c2-convex-bsd
  322. fi
  323. - exit ;;
  324. + exit ;;
  325. C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
  326. echo c34-convex-bsd
  327. - exit ;;
  328. + exit ;;
  329. C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
  330. echo c38-convex-bsd
  331. - exit ;;
  332. + exit ;;
  333. C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
  334. echo c4-convex-bsd
  335. - exit ;;
  336. + exit ;;
  337. CRAY*Y-MP:*:*:*)
  338. echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  339. exit ;;
  340. @@ -766,14 +790,14 @@ EOF
  341. exit ;;
  342. F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
  343. FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  344. - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
  345. - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
  346. - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
  347. - exit ;;
  348. + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
  349. + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
  350. + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
  351. + exit ;;
  352. 5000:UNIX_System_V:4.*:*)
  353. - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
  354. - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
  355. - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
  356. + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
  357. + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
  358. + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
  359. exit ;;
  360. i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
  361. echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
  362. @@ -785,34 +809,39 @@ EOF
  363. echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
  364. exit ;;
  365. *:FreeBSD:*:*)
  366. - case ${UNAME_MACHINE} in
  367. - pc98)
  368. - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
  369. + UNAME_PROCESSOR=`/usr/bin/uname -p`
  370. + case ${UNAME_PROCESSOR} in
  371. amd64)
  372. echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
  373. *)
  374. - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
  375. + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
  376. esac
  377. exit ;;
  378. i*:CYGWIN*:*)
  379. echo ${UNAME_MACHINE}-pc-cygwin
  380. exit ;;
  381. + *:MINGW64*:*)
  382. + echo ${UNAME_MACHINE}-pc-mingw64
  383. + exit ;;
  384. *:MINGW*:*)
  385. echo ${UNAME_MACHINE}-pc-mingw32
  386. exit ;;
  387. + i*:MSYS*:*)
  388. + echo ${UNAME_MACHINE}-pc-msys
  389. + exit ;;
  390. i*:windows32*:*)
  391. - # uname -m includes "-pc" on this system.
  392. - echo ${UNAME_MACHINE}-mingw32
  393. + # uname -m includes "-pc" on this system.
  394. + echo ${UNAME_MACHINE}-mingw32
  395. exit ;;
  396. i*:PW*:*)
  397. echo ${UNAME_MACHINE}-pc-pw32
  398. exit ;;
  399. - *:Interix*:[3456]*)
  400. - case ${UNAME_MACHINE} in
  401. + *:Interix*:*)
  402. + case ${UNAME_MACHINE} in
  403. x86)
  404. echo i586-pc-interix${UNAME_RELEASE}
  405. exit ;;
  406. - EM64T | authenticamd | genuineintel)
  407. + authenticamd | genuineintel | EM64T)
  408. echo x86_64-unknown-interix${UNAME_RELEASE}
  409. exit ;;
  410. IA64)
  411. @@ -845,45 +874,81 @@ EOF
  412. exit ;;
  413. *:GNU:*:*)
  414. # the GNU system
  415. - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
  416. + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
  417. exit ;;
  418. *:GNU/*:*:*)
  419. # other systems with GNU libc and userland
  420. - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
  421. + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
  422. exit ;;
  423. i*86:Minix:*:*)
  424. echo ${UNAME_MACHINE}-pc-minix
  425. exit ;;
  426. + aarch64:Linux:*:*)
  427. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  428. + exit ;;
  429. + aarch64_be:Linux:*:*)
  430. + UNAME_MACHINE=aarch64_be
  431. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  432. + exit ;;
  433. + alpha:Linux:*:*)
  434. + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
  435. + EV5) UNAME_MACHINE=alphaev5 ;;
  436. + EV56) UNAME_MACHINE=alphaev56 ;;
  437. + PCA56) UNAME_MACHINE=alphapca56 ;;
  438. + PCA57) UNAME_MACHINE=alphapca56 ;;
  439. + EV6) UNAME_MACHINE=alphaev6 ;;
  440. + EV67) UNAME_MACHINE=alphaev67 ;;
  441. + EV68*) UNAME_MACHINE=alphaev68 ;;
  442. + esac
  443. + objdump --private-headers /bin/sh | grep -q ld.so.1
  444. + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
  445. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  446. + exit ;;
  447. + arc:Linux:*:* | arceb:Linux:*:*)
  448. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  449. + exit ;;
  450. arm*:Linux:*:*)
  451. eval $set_cc_for_build
  452. if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
  453. | grep -q __ARM_EABI__
  454. then
  455. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  456. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  457. else
  458. - echo ${UNAME_MACHINE}-unknown-linux-gnueabi
  459. + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
  460. + | grep -q __ARM_PCS_VFP
  461. + then
  462. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
  463. + else
  464. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
  465. + fi
  466. fi
  467. exit ;;
  468. avr32*:Linux:*:*)
  469. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  470. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  471. exit ;;
  472. cris:Linux:*:*)
  473. - echo cris-axis-linux-gnu
  474. + echo ${UNAME_MACHINE}-axis-linux-${LIBC}
  475. exit ;;
  476. crisv32:Linux:*:*)
  477. - echo crisv32-axis-linux-gnu
  478. + echo ${UNAME_MACHINE}-axis-linux-${LIBC}
  479. exit ;;
  480. frv:Linux:*:*)
  481. - echo frv-unknown-linux-gnu
  482. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  483. + exit ;;
  484. + hexagon:Linux:*:*)
  485. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  486. + exit ;;
  487. + i*86:Linux:*:*)
  488. + echo ${UNAME_MACHINE}-pc-linux-${LIBC}
  489. exit ;;
  490. ia64:Linux:*:*)
  491. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  492. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  493. exit ;;
  494. m32r*:Linux:*:*)
  495. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  496. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  497. exit ;;
  498. m68*:Linux:*:*)
  499. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  500. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  501. exit ;;
  502. mips:Linux:*:* | mips64:Linux:*:*)
  503. eval $set_cc_for_build
  504. @@ -901,123 +966,65 @@ EOF
  505. #endif
  506. #endif
  507. EOF
  508. - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
  509. - /^CPU/{
  510. - s: ::g
  511. - p
  512. - }'`"
  513. - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
  514. + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
  515. + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
  516. ;;
  517. - or32:Linux:*:*)
  518. - echo or32-unknown-linux-gnu
  519. - exit ;;
  520. - ppc:Linux:*:*)
  521. - echo powerpc-unknown-linux-gnu
  522. - exit ;;
  523. - ppc64:Linux:*:*)
  524. - echo powerpc64-unknown-linux-gnu
  525. + or1k:Linux:*:*)
  526. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  527. exit ;;
  528. - alpha:Linux:*:*)
  529. - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
  530. - EV5) UNAME_MACHINE=alphaev5 ;;
  531. - EV56) UNAME_MACHINE=alphaev56 ;;
  532. - PCA56) UNAME_MACHINE=alphapca56 ;;
  533. - PCA57) UNAME_MACHINE=alphapca56 ;;
  534. - EV6) UNAME_MACHINE=alphaev6 ;;
  535. - EV67) UNAME_MACHINE=alphaev67 ;;
  536. - EV68*) UNAME_MACHINE=alphaev68 ;;
  537. - esac
  538. - objdump --private-headers /bin/sh | grep -q ld.so.1
  539. - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
  540. - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
  541. + or32:Linux:*:*)
  542. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  543. exit ;;
  544. padre:Linux:*:*)
  545. - echo sparc-unknown-linux-gnu
  546. + echo sparc-unknown-linux-${LIBC}
  547. + exit ;;
  548. + parisc64:Linux:*:* | hppa64:Linux:*:*)
  549. + echo hppa64-unknown-linux-${LIBC}
  550. exit ;;
  551. parisc:Linux:*:* | hppa:Linux:*:*)
  552. # Look for CPU level
  553. case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
  554. - PA7*) echo hppa1.1-unknown-linux-gnu ;;
  555. - PA8*) echo hppa2.0-unknown-linux-gnu ;;
  556. - *) echo hppa-unknown-linux-gnu ;;
  557. + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
  558. + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
  559. + *) echo hppa-unknown-linux-${LIBC} ;;
  560. esac
  561. exit ;;
  562. - parisc64:Linux:*:* | hppa64:Linux:*:*)
  563. - echo hppa64-unknown-linux-gnu
  564. + ppc64:Linux:*:*)
  565. + echo powerpc64-unknown-linux-${LIBC}
  566. + exit ;;
  567. + ppc:Linux:*:*)
  568. + echo powerpc-unknown-linux-${LIBC}
  569. + exit ;;
  570. + ppc64le:Linux:*:*)
  571. + echo powerpc64le-unknown-linux-${LIBC}
  572. + exit ;;
  573. + ppcle:Linux:*:*)
  574. + echo powerpcle-unknown-linux-${LIBC}
  575. exit ;;
  576. s390:Linux:*:* | s390x:Linux:*:*)
  577. - echo ${UNAME_MACHINE}-ibm-linux
  578. + echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
  579. exit ;;
  580. sh64*:Linux:*:*)
  581. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  582. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  583. exit ;;
  584. sh*:Linux:*:*)
  585. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  586. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  587. exit ;;
  588. sparc:Linux:*:* | sparc64:Linux:*:*)
  589. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  590. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  591. + exit ;;
  592. + tile*:Linux:*:*)
  593. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  594. exit ;;
  595. vax:Linux:*:*)
  596. - echo ${UNAME_MACHINE}-dec-linux-gnu
  597. + echo ${UNAME_MACHINE}-dec-linux-${LIBC}
  598. exit ;;
  599. x86_64:Linux:*:*)
  600. - echo x86_64-unknown-linux-gnu
  601. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  602. exit ;;
  603. xtensa*:Linux:*:*)
  604. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  605. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  606. exit ;;
  607. - i*86:Linux:*:*)
  608. - # The BFD linker knows what the default object file format is, so
  609. - # first see if it will tell us. cd to the root directory to prevent
  610. - # problems with other programs or directories called `ld' in the path.
  611. - # Set LC_ALL=C to ensure ld outputs messages in English.
  612. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
  613. - | sed -ne '/supported targets:/!d
  614. - s/[ ][ ]*/ /g
  615. - s/.*supported targets: *//
  616. - s/ .*//
  617. - p'`
  618. - case "$ld_supported_targets" in
  619. - elf32-i386)
  620. - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
  621. - ;;
  622. - esac
  623. - # Determine whether the default compiler is a.out or elf
  624. - eval $set_cc_for_build
  625. - sed 's/^ //' << EOF >$dummy.c
  626. - #include <features.h>
  627. - #ifdef __ELF__
  628. - # ifdef __GLIBC__
  629. - # if __GLIBC__ >= 2
  630. - LIBC=gnu
  631. - # else
  632. - LIBC=gnulibc1
  633. - # endif
  634. - # else
  635. - LIBC=gnulibc1
  636. - # endif
  637. - #else
  638. - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
  639. - LIBC=gnu
  640. - #else
  641. - LIBC=gnuaout
  642. - #endif
  643. - #endif
  644. - #ifdef __dietlibc__
  645. - LIBC=dietlibc
  646. - #endif
  647. -EOF
  648. - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
  649. - /^LIBC/{
  650. - s: ::g
  651. - p
  652. - }'`"
  653. - test x"${LIBC}" != x && {
  654. - echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
  655. - exit
  656. - }
  657. - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
  658. - ;;
  659. i*86:DYNIX/ptx:4*:*)
  660. # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
  661. # earlier versions are messed up and put the nodename in both
  662. @@ -1025,11 +1032,11 @@ EOF
  663. echo i386-sequent-sysv4
  664. exit ;;
  665. i*86:UNIX_SV:4.2MP:2.*)
  666. - # Unixware is an offshoot of SVR4, but it has its own version
  667. - # number series starting with 2...
  668. - # I am not positive that other SVR4 systems won't match this,
  669. + # Unixware is an offshoot of SVR4, but it has its own version
  670. + # number series starting with 2...
  671. + # I am not positive that other SVR4 systems won't match this,
  672. # I just have to hope. -- rms.
  673. - # Use sysv4.2uw... so that sysv4* matches it.
  674. + # Use sysv4.2uw... so that sysv4* matches it.
  675. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
  676. exit ;;
  677. i*86:OS/2:*:*)
  678. @@ -1061,7 +1068,7 @@ EOF
  679. fi
  680. exit ;;
  681. i*86:*:5:[678]*)
  682. - # UnixWare 7.x, OpenUNIX and OpenServer 6.
  683. + # UnixWare 7.x, OpenUNIX and OpenServer 6.
  684. case `/bin/uname -X | grep "^Machine"` in
  685. *486*) UNAME_MACHINE=i486 ;;
  686. *Pentium) UNAME_MACHINE=i586 ;;
  687. @@ -1089,13 +1096,13 @@ EOF
  688. exit ;;
  689. pc:*:*:*)
  690. # Left here for compatibility:
  691. - # uname -m prints for DJGPP always 'pc', but it prints nothing about
  692. - # the processor, so we play safe by assuming i586.
  693. + # uname -m prints for DJGPP always 'pc', but it prints nothing about
  694. + # the processor, so we play safe by assuming i586.
  695. # Note: whatever this is, it MUST be the same as what config.sub
  696. # prints for the "djgpp" host, or else GDB configury will decide that
  697. # this is a cross-build.
  698. echo i586-pc-msdosdjgpp
  699. - exit ;;
  700. + exit ;;
  701. Intel:Mach:3*:*)
  702. echo i386-pc-mach3
  703. exit ;;
  704. @@ -1130,8 +1137,8 @@ EOF
  705. /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
  706. && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
  707. 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
  708. - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  709. - && { echo i486-ncr-sysv4; exit; } ;;
  710. + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  711. + && { echo i486-ncr-sysv4; exit; } ;;
  712. NCR*:*:4.2:* | MPRAS*:*:4.2:*)
  713. OS_REL='.3'
  714. test -r /etc/.relid \
  715. @@ -1174,10 +1181,10 @@ EOF
  716. echo ns32k-sni-sysv
  717. fi
  718. exit ;;
  719. - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
  720. - # says <Richard.M.Bartel@ccMail.Census.GOV>
  721. - echo i586-unisys-sysv4
  722. - exit ;;
  723. + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
  724. + # says <Richard.M.Bartel@ccMail.Census.GOV>
  725. + echo i586-unisys-sysv4
  726. + exit ;;
  727. *:UNIX_System_V:4*:FTX*)
  728. # From Gerald Hewes <hewes@openmarket.com>.
  729. # How about differentiating between stratus architectures? -djm
  730. @@ -1203,11 +1210,11 @@ EOF
  731. exit ;;
  732. R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
  733. if [ -d /usr/nec ]; then
  734. - echo mips-nec-sysv${UNAME_RELEASE}
  735. + echo mips-nec-sysv${UNAME_RELEASE}
  736. else
  737. - echo mips-unknown-sysv${UNAME_RELEASE}
  738. + echo mips-unknown-sysv${UNAME_RELEASE}
  739. fi
  740. - exit ;;
  741. + exit ;;
  742. BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
  743. echo powerpc-be-beos
  744. exit ;;
  745. @@ -1220,6 +1227,9 @@ EOF
  746. BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
  747. echo i586-pc-haiku
  748. exit ;;
  749. + x86_64:Haiku:*:*)
  750. + echo x86_64-unknown-haiku
  751. + exit ;;
  752. SX-4:SUPER-UX:*:*)
  753. echo sx4-nec-superux${UNAME_RELEASE}
  754. exit ;;
  755. @@ -1246,9 +1256,31 @@ EOF
  756. exit ;;
  757. *:Darwin:*:*)
  758. UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
  759. - case $UNAME_PROCESSOR in
  760. - unknown) UNAME_PROCESSOR=powerpc ;;
  761. - esac
  762. + eval $set_cc_for_build
  763. + if test "$UNAME_PROCESSOR" = unknown ; then
  764. + UNAME_PROCESSOR=powerpc
  765. + fi
  766. + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
  767. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
  768. + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
  769. + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
  770. + grep IS_64BIT_ARCH >/dev/null
  771. + then
  772. + case $UNAME_PROCESSOR in
  773. + i386) UNAME_PROCESSOR=x86_64 ;;
  774. + powerpc) UNAME_PROCESSOR=powerpc64 ;;
  775. + esac
  776. + fi
  777. + fi
  778. + elif test "$UNAME_PROCESSOR" = i386 ; then
  779. + # Avoid executing cc on OS X 10.9, as it ships with a stub
  780. + # that puts up a graphical alert prompting to install
  781. + # developer tools. Any system running Mac OS X 10.7 or
  782. + # later (Darwin 11 and later) is required to have a 64-bit
  783. + # processor. This is not true of the ARM version of Darwin
  784. + # that Apple uses in portable devices.
  785. + UNAME_PROCESSOR=x86_64
  786. + fi
  787. echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
  788. exit ;;
  789. *:procnto*:*:* | *:QNX:[0123456789]*:*)
  790. @@ -1262,7 +1294,10 @@ EOF
  791. *:QNX:*:4*)
  792. echo i386-pc-qnx
  793. exit ;;
  794. - NSE-?:NONSTOP_KERNEL:*:*)
  795. + NEO-?:NONSTOP_KERNEL:*:*)
  796. + echo neo-tandem-nsk${UNAME_RELEASE}
  797. + exit ;;
  798. + NSE-*:NONSTOP_KERNEL:*:*)
  799. echo nse-tandem-nsk${UNAME_RELEASE}
  800. exit ;;
  801. NSR-?:NONSTOP_KERNEL:*:*)
  802. @@ -1307,13 +1342,13 @@ EOF
  803. echo pdp10-unknown-its
  804. exit ;;
  805. SEI:*:*:SEIUX)
  806. - echo mips-sei-seiux${UNAME_RELEASE}
  807. + echo mips-sei-seiux${UNAME_RELEASE}
  808. exit ;;
  809. *:DragonFly:*:*)
  810. echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
  811. exit ;;
  812. *:*VMS:*:*)
  813. - UNAME_MACHINE=`(uname -p) 2>/dev/null`
  814. + UNAME_MACHINE=`(uname -p) 2>/dev/null`
  815. case "${UNAME_MACHINE}" in
  816. A*) echo alpha-dec-vms ; exit ;;
  817. I*) echo ia64-dec-vms ; exit ;;
  818. @@ -1331,158 +1366,10 @@ EOF
  819. i*86:AROS:*:*)
  820. echo ${UNAME_MACHINE}-pc-aros
  821. exit ;;
  822. -esac
  823. -
  824. -#echo '(No uname command or uname output not recognized.)' 1>&2
  825. -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
  826. -
  827. -eval $set_cc_for_build
  828. -cat >$dummy.c <<EOF
  829. -#ifdef _SEQUENT_
  830. -# include <sys/types.h>
  831. -# include <sys/utsname.h>
  832. -#endif
  833. -main ()
  834. -{
  835. -#if defined (sony)
  836. -#if defined (MIPSEB)
  837. - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
  838. - I don't know.... */
  839. - printf ("mips-sony-bsd\n"); exit (0);
  840. -#else
  841. -#include <sys/param.h>
  842. - printf ("m68k-sony-newsos%s\n",
  843. -#ifdef NEWSOS4
  844. - "4"
  845. -#else
  846. - ""
  847. -#endif
  848. - ); exit (0);
  849. -#endif
  850. -#endif
  851. -
  852. -#if defined (__arm) && defined (__acorn) && defined (__unix)
  853. - printf ("arm-acorn-riscix\n"); exit (0);
  854. -#endif
  855. -
  856. -#if defined (hp300) && !defined (hpux)
  857. - printf ("m68k-hp-bsd\n"); exit (0);
  858. -#endif
  859. -
  860. -#if defined (NeXT)
  861. -#if !defined (__ARCHITECTURE__)
  862. -#define __ARCHITECTURE__ "m68k"
  863. -#endif
  864. - int version;
  865. - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
  866. - if (version < 4)
  867. - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
  868. - else
  869. - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
  870. - exit (0);
  871. -#endif
  872. -
  873. -#if defined (MULTIMAX) || defined (n16)
  874. -#if defined (UMAXV)
  875. - printf ("ns32k-encore-sysv\n"); exit (0);
  876. -#else
  877. -#if defined (CMU)
  878. - printf ("ns32k-encore-mach\n"); exit (0);
  879. -#else
  880. - printf ("ns32k-encore-bsd\n"); exit (0);
  881. -#endif
  882. -#endif
  883. -#endif
  884. -
  885. -#if defined (__386BSD__)
  886. - printf ("i386-pc-bsd\n"); exit (0);
  887. -#endif
  888. -
  889. -#if defined (sequent)
  890. -#if defined (i386)
  891. - printf ("i386-sequent-dynix\n"); exit (0);
  892. -#endif
  893. -#if defined (ns32000)
  894. - printf ("ns32k-sequent-dynix\n"); exit (0);
  895. -#endif
  896. -#endif
  897. -
  898. -#if defined (_SEQUENT_)
  899. - struct utsname un;
  900. -
  901. - uname(&un);
  902. -
  903. - if (strncmp(un.version, "V2", 2) == 0) {
  904. - printf ("i386-sequent-ptx2\n"); exit (0);
  905. - }
  906. - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
  907. - printf ("i386-sequent-ptx1\n"); exit (0);
  908. - }
  909. - printf ("i386-sequent-ptx\n"); exit (0);
  910. -
  911. -#endif
  912. -
  913. -#if defined (vax)
  914. -# if !defined (ultrix)
  915. -# include <sys/param.h>
  916. -# if defined (BSD)
  917. -# if BSD == 43
  918. - printf ("vax-dec-bsd4.3\n"); exit (0);
  919. -# else
  920. -# if BSD == 199006
  921. - printf ("vax-dec-bsd4.3reno\n"); exit (0);
  922. -# else
  923. - printf ("vax-dec-bsd\n"); exit (0);
  924. -# endif
  925. -# endif
  926. -# else
  927. - printf ("vax-dec-bsd\n"); exit (0);
  928. -# endif
  929. -# else
  930. - printf ("vax-dec-ultrix\n"); exit (0);
  931. -# endif
  932. -#endif
  933. -
  934. -#if defined (alliant) && defined (i860)
  935. - printf ("i860-alliant-bsd\n"); exit (0);
  936. -#endif
  937. -
  938. - exit (1);
  939. -}
  940. -EOF
  941. -
  942. -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
  943. - { echo "$SYSTEM_NAME"; exit; }
  944. -
  945. -# Apollos put the system type in the environment.
  946. -
  947. -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
  948. -
  949. -# Convex versions that predate uname can use getsysinfo(1)
  950. -
  951. -if [ -x /usr/convex/getsysinfo ]
  952. -then
  953. - case `getsysinfo -f cpu_type` in
  954. - c1*)
  955. - echo c1-convex-bsd
  956. - exit ;;
  957. - c2*)
  958. - if getsysinfo -f scalar_acc
  959. - then echo c32-convex-bsd
  960. - else echo c2-convex-bsd
  961. - fi
  962. - exit ;;
  963. - c34*)
  964. - echo c34-convex-bsd
  965. - exit ;;
  966. - c38*)
  967. - echo c38-convex-bsd
  968. - exit ;;
  969. - c4*)
  970. - echo c4-convex-bsd
  971. + x86_64:VMkernel:*:*)
  972. + echo ${UNAME_MACHINE}-unknown-esx
  973. exit ;;
  974. - esac
  975. -fi
  976. +esac
  977. cat >&2 <<EOF
  978. $0: unable to guess system type