patch-lib_libmpeg2__auto_config_guess 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123
  1. --- xbmc-imx6-13.2.orig/lib/libmpeg2/.auto/config.guess 2014-09-02 13:26:19.000000000 +0200
  2. +++ xbmc-imx6-13.2/lib/libmpeg2/.auto/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
  8. -# Free Software Foundation, Inc.
  9. +# Copyright 1992-2014 Free Software Foundation, Inc.
  10. -timestamp='2008-01-23'
  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='2008-01-23'
  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. @@ -170,7 +184,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
  96. arm*|i386|m68k|ns32k|sh3*|sparc|vax)
  97. eval $set_cc_for_build
  98. if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
  99. - | grep __ELF__ >/dev/null
  100. + | grep -q __ELF__
  101. then
  102. # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
  103. # Return netbsd for either. FIX?
  104. @@ -180,7 +194,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
  105. fi
  106. ;;
  107. *)
  108. - os=netbsd
  109. + os=netbsd
  110. ;;
  111. esac
  112. # The OS release
  113. @@ -201,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
  114. # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
  115. echo "${machine}-${os}${release}"
  116. exit ;;
  117. + *:Bitrig:*:*)
  118. + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
  119. + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
  120. + exit ;;
  121. *:OpenBSD:*:*)
  122. UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
  123. echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
  124. @@ -223,7 +241,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
  125. UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
  126. ;;
  127. *5.*)
  128. - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
  129. + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
  130. ;;
  131. esac
  132. # According to Compaq, /usr/sbin/psrinfo has been available on
  133. @@ -269,7 +287,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
  134. # A Xn.n version is an unreleased experimental baselevel.
  135. # 1.2 uses "1.2" for uname -r.
  136. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  137. - exit ;;
  138. + # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
  139. + exitcode=$?
  140. + trap '' 0
  141. + exit $exitcode ;;
  142. Alpha\ *:Windows_NT*:*)
  143. # How do we know it's Interix rather than the generic POSIX subsystem?
  144. # Should we change UNAME_MACHINE based on the output of uname instead
  145. @@ -295,12 +316,12 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
  146. echo s390-ibm-zvmoe
  147. exit ;;
  148. *:OS400:*:*)
  149. - echo powerpc-ibm-os400
  150. + echo powerpc-ibm-os400
  151. exit ;;
  152. arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
  153. echo arm-acorn-riscix${UNAME_RELEASE}
  154. exit ;;
  155. - arm:riscos:*:*|arm:RISCOS:*:*)
  156. + arm*:riscos:*:*|arm*:RISCOS:*:*)
  157. echo arm-unknown-riscos
  158. exit ;;
  159. SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
  160. @@ -324,14 +345,33 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
  161. case `/usr/bin/uname -p` in
  162. sparc) echo sparc-icl-nx7; exit ;;
  163. esac ;;
  164. + s390x:SunOS:*:*)
  165. + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  166. + exit ;;
  167. sun4H:SunOS:5.*:*)
  168. echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  169. exit ;;
  170. sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
  171. echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  172. exit ;;
  173. + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
  174. + echo i386-pc-auroraux${UNAME_RELEASE}
  175. + exit ;;
  176. i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
  177. - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  178. + eval $set_cc_for_build
  179. + SUN_ARCH="i386"
  180. + # If there is a compiler, see if it is configured for 64-bit objects.
  181. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
  182. + # This test works for both compilers.
  183. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
  184. + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
  185. + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
  186. + grep IS_64BIT_ARCH >/dev/null
  187. + then
  188. + SUN_ARCH="x86_64"
  189. + fi
  190. + fi
  191. + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
  192. exit ;;
  193. sun4*:SunOS:6*:*)
  194. # According to config.sub, this is the proper way to canonicalize
  195. @@ -375,23 +415,23 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:$
  196. # MiNT. But MiNT is downward compatible to TOS, so this should
  197. # be no problem.
  198. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
  199. - echo m68k-atari-mint${UNAME_RELEASE}
  200. + echo m68k-atari-mint${UNAME_RELEASE}
  201. exit ;;
  202. atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
  203. echo m68k-atari-mint${UNAME_RELEASE}
  204. - exit ;;
  205. + exit ;;
  206. *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
  207. - echo m68k-atari-mint${UNAME_RELEASE}
  208. + echo m68k-atari-mint${UNAME_RELEASE}
  209. exit ;;
  210. milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
  211. - echo m68k-milan-mint${UNAME_RELEASE}
  212. - exit ;;
  213. + echo m68k-milan-mint${UNAME_RELEASE}
  214. + exit ;;
  215. hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
  216. - echo m68k-hades-mint${UNAME_RELEASE}
  217. - exit ;;
  218. + echo m68k-hades-mint${UNAME_RELEASE}
  219. + exit ;;
  220. *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
  221. - echo m68k-unknown-mint${UNAME_RELEASE}
  222. - exit ;;
  223. + echo m68k-unknown-mint${UNAME_RELEASE}
  224. + exit ;;
  225. m68k:machten:*:*)
  226. echo m68k-apple-machten${UNAME_RELEASE}
  227. exit ;;
  228. @@ -461,8 +501,8 @@ EOF
  229. echo m88k-motorola-sysv3
  230. exit ;;
  231. AViiON:dgux:*:*)
  232. - # DG/UX returns AViiON for all architectures
  233. - UNAME_PROCESSOR=`/usr/bin/uname -p`
  234. + # DG/UX returns AViiON for all architectures
  235. + UNAME_PROCESSOR=`/usr/bin/uname -p`
  236. if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
  237. then
  238. if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
  239. @@ -475,7 +515,7 @@ EOF
  240. else
  241. echo i586-dg-dgux${UNAME_RELEASE}
  242. fi
  243. - exit ;;
  244. + exit ;;
  245. M88*:DolphinOS:*:*) # DolphinOS (SVR3)
  246. echo m88k-dolphin-sysv3
  247. exit ;;
  248. @@ -532,7 +572,7 @@ EOF
  249. echo rs6000-ibm-aix3.2
  250. fi
  251. exit ;;
  252. - *:AIX:*:[456])
  253. + *:AIX:*:[4567])
  254. IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
  255. if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
  256. IBM_ARCH=rs6000
  257. @@ -575,52 +615,52 @@ EOF
  258. 9000/[678][0-9][0-9])
  259. if [ -x /usr/bin/getconf ]; then
  260. sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
  261. - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
  262. - case "${sc_cpu_version}" in
  263. - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
  264. - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
  265. - 532) # CPU_PA_RISC2_0
  266. - case "${sc_kernel_bits}" in
  267. - 32) HP_ARCH="hppa2.0n" ;;
  268. - 64) HP_ARCH="hppa2.0w" ;;
  269. + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
  270. + case "${sc_cpu_version}" in
  271. + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
  272. + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
  273. + 532) # CPU_PA_RISC2_0
  274. + case "${sc_kernel_bits}" in
  275. + 32) HP_ARCH="hppa2.0n" ;;
  276. + 64) HP_ARCH="hppa2.0w" ;;
  277. '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
  278. - esac ;;
  279. - esac
  280. + esac ;;
  281. + esac
  282. fi
  283. if [ "${HP_ARCH}" = "" ]; then
  284. eval $set_cc_for_build
  285. - sed 's/^ //' << EOF >$dummy.c
  286. + sed 's/^ //' << EOF >$dummy.c
  287. - #define _HPUX_SOURCE
  288. - #include <stdlib.h>
  289. - #include <unistd.h>
  290. + #define _HPUX_SOURCE
  291. + #include <stdlib.h>
  292. + #include <unistd.h>
  293. - int main ()
  294. - {
  295. - #if defined(_SC_KERNEL_BITS)
  296. - long bits = sysconf(_SC_KERNEL_BITS);
  297. - #endif
  298. - long cpu = sysconf (_SC_CPU_VERSION);
  299. + int main ()
  300. + {
  301. + #if defined(_SC_KERNEL_BITS)
  302. + long bits = sysconf(_SC_KERNEL_BITS);
  303. + #endif
  304. + long cpu = sysconf (_SC_CPU_VERSION);
  305. - switch (cpu)
  306. - {
  307. - case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
  308. - case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
  309. - case CPU_PA_RISC2_0:
  310. - #if defined(_SC_KERNEL_BITS)
  311. - switch (bits)
  312. - {
  313. - case 64: puts ("hppa2.0w"); break;
  314. - case 32: puts ("hppa2.0n"); break;
  315. - default: puts ("hppa2.0"); break;
  316. - } break;
  317. - #else /* !defined(_SC_KERNEL_BITS) */
  318. - puts ("hppa2.0"); break;
  319. - #endif
  320. - default: puts ("hppa1.0"); break;
  321. - }
  322. - exit (0);
  323. - }
  324. + switch (cpu)
  325. + {
  326. + case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
  327. + case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
  328. + case CPU_PA_RISC2_0:
  329. + #if defined(_SC_KERNEL_BITS)
  330. + switch (bits)
  331. + {
  332. + case 64: puts ("hppa2.0w"); break;
  333. + case 32: puts ("hppa2.0n"); break;
  334. + default: puts ("hppa2.0"); break;
  335. + } break;
  336. + #else /* !defined(_SC_KERNEL_BITS) */
  337. + puts ("hppa2.0"); break;
  338. + #endif
  339. + default: puts ("hppa1.0"); break;
  340. + }
  341. + exit (0);
  342. + }
  343. EOF
  344. (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
  345. test -z "$HP_ARCH" && HP_ARCH=hppa
  346. @@ -640,7 +680,7 @@ EOF
  347. # => hppa64-hp-hpux11.23
  348. if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
  349. - grep __LP64__ >/dev/null
  350. + grep -q __LP64__
  351. then
  352. HP_ARCH="hppa2.0w"
  353. else
  354. @@ -711,22 +751,22 @@ EOF
  355. exit ;;
  356. C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
  357. echo c1-convex-bsd
  358. - exit ;;
  359. + exit ;;
  360. C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
  361. if getsysinfo -f scalar_acc
  362. then echo c32-convex-bsd
  363. else echo c2-convex-bsd
  364. fi
  365. - exit ;;
  366. + exit ;;
  367. C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
  368. echo c34-convex-bsd
  369. - exit ;;
  370. + exit ;;
  371. C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
  372. echo c38-convex-bsd
  373. - exit ;;
  374. + exit ;;
  375. C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
  376. echo c4-convex-bsd
  377. - exit ;;
  378. + exit ;;
  379. CRAY*Y-MP:*:*:*)
  380. echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
  381. exit ;;
  382. @@ -750,14 +790,14 @@ EOF
  383. exit ;;
  384. F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
  385. FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
  386. - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
  387. - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
  388. - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
  389. - exit ;;
  390. + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
  391. + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
  392. + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
  393. + exit ;;
  394. 5000:UNIX_System_V:4.*:*)
  395. - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
  396. - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
  397. - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
  398. + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
  399. + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
  400. + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
  401. exit ;;
  402. i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
  403. echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
  404. @@ -769,34 +809,39 @@ EOF
  405. echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
  406. exit ;;
  407. *:FreeBSD:*:*)
  408. - case ${UNAME_MACHINE} in
  409. - pc98)
  410. - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
  411. + UNAME_PROCESSOR=`/usr/bin/uname -p`
  412. + case ${UNAME_PROCESSOR} in
  413. amd64)
  414. echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
  415. *)
  416. - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
  417. + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
  418. esac
  419. exit ;;
  420. i*:CYGWIN*:*)
  421. echo ${UNAME_MACHINE}-pc-cygwin
  422. exit ;;
  423. + *:MINGW64*:*)
  424. + echo ${UNAME_MACHINE}-pc-mingw64
  425. + exit ;;
  426. *:MINGW*:*)
  427. echo ${UNAME_MACHINE}-pc-mingw32
  428. exit ;;
  429. + i*:MSYS*:*)
  430. + echo ${UNAME_MACHINE}-pc-msys
  431. + exit ;;
  432. i*:windows32*:*)
  433. - # uname -m includes "-pc" on this system.
  434. - echo ${UNAME_MACHINE}-mingw32
  435. + # uname -m includes "-pc" on this system.
  436. + echo ${UNAME_MACHINE}-mingw32
  437. exit ;;
  438. i*:PW*:*)
  439. echo ${UNAME_MACHINE}-pc-pw32
  440. exit ;;
  441. - *:Interix*:[3456]*)
  442. - case ${UNAME_MACHINE} in
  443. + *:Interix*:*)
  444. + case ${UNAME_MACHINE} in
  445. x86)
  446. echo i586-pc-interix${UNAME_RELEASE}
  447. exit ;;
  448. - EM64T | authenticamd)
  449. + authenticamd | genuineintel | EM64T)
  450. echo x86_64-unknown-interix${UNAME_RELEASE}
  451. exit ;;
  452. IA64)
  453. @@ -806,6 +851,9 @@ EOF
  454. [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
  455. echo i${UNAME_MACHINE}-pc-mks
  456. exit ;;
  457. + 8664:Windows_NT:*)
  458. + echo x86_64-pc-mks
  459. + exit ;;
  460. i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
  461. # How do we know it's Interix rather than the generic POSIX subsystem?
  462. # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
  463. @@ -826,210 +874,157 @@ EOF
  464. exit ;;
  465. *:GNU:*:*)
  466. # the GNU system
  467. - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
  468. + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
  469. exit ;;
  470. *:GNU/*:*:*)
  471. # other systems with GNU libc and userland
  472. - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
  473. + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC}
  474. exit ;;
  475. i*86:Minix:*:*)
  476. echo ${UNAME_MACHINE}-pc-minix
  477. exit ;;
  478. + aarch64:Linux:*:*)
  479. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  480. + exit ;;
  481. + aarch64_be:Linux:*:*)
  482. + UNAME_MACHINE=aarch64_be
  483. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  484. + exit ;;
  485. + alpha:Linux:*:*)
  486. + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
  487. + EV5) UNAME_MACHINE=alphaev5 ;;
  488. + EV56) UNAME_MACHINE=alphaev56 ;;
  489. + PCA56) UNAME_MACHINE=alphapca56 ;;
  490. + PCA57) UNAME_MACHINE=alphapca56 ;;
  491. + EV6) UNAME_MACHINE=alphaev6 ;;
  492. + EV67) UNAME_MACHINE=alphaev67 ;;
  493. + EV68*) UNAME_MACHINE=alphaev68 ;;
  494. + esac
  495. + objdump --private-headers /bin/sh | grep -q ld.so.1
  496. + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
  497. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  498. + exit ;;
  499. + arc:Linux:*:* | arceb:Linux:*:*)
  500. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  501. + exit ;;
  502. arm*:Linux:*:*)
  503. eval $set_cc_for_build
  504. if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
  505. | grep -q __ARM_EABI__
  506. then
  507. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  508. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  509. else
  510. - echo ${UNAME_MACHINE}-unknown-linux-gnueabi
  511. + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
  512. + | grep -q __ARM_PCS_VFP
  513. + then
  514. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
  515. + else
  516. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
  517. + fi
  518. fi
  519. exit ;;
  520. avr32*:Linux:*:*)
  521. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  522. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  523. exit ;;
  524. cris:Linux:*:*)
  525. - echo cris-axis-linux-gnu
  526. + echo ${UNAME_MACHINE}-axis-linux-${LIBC}
  527. exit ;;
  528. crisv32:Linux:*:*)
  529. - echo crisv32-axis-linux-gnu
  530. + echo ${UNAME_MACHINE}-axis-linux-${LIBC}
  531. exit ;;
  532. frv:Linux:*:*)
  533. - echo frv-unknown-linux-gnu
  534. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  535. + exit ;;
  536. + hexagon:Linux:*:*)
  537. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  538. + exit ;;
  539. + i*86:Linux:*:*)
  540. + echo ${UNAME_MACHINE}-pc-linux-${LIBC}
  541. exit ;;
  542. ia64:Linux:*:*)
  543. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  544. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  545. exit ;;
  546. m32r*:Linux:*:*)
  547. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  548. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  549. exit ;;
  550. m68*:Linux:*:*)
  551. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  552. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  553. exit ;;
  554. - mips:Linux:*:*)
  555. - eval $set_cc_for_build
  556. - sed 's/^ //' << EOF >$dummy.c
  557. - #undef CPU
  558. - #undef mips
  559. - #undef mipsel
  560. - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
  561. - CPU=mipsel
  562. - #else
  563. - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
  564. - CPU=mips
  565. - #else
  566. - CPU=
  567. - #endif
  568. - #endif
  569. -EOF
  570. - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
  571. - /^CPU/{
  572. - s: ::g
  573. - p
  574. - }'`"
  575. - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
  576. - ;;
  577. - mips64:Linux:*:*)
  578. + mips:Linux:*:* | mips64:Linux:*:*)
  579. eval $set_cc_for_build
  580. sed 's/^ //' << EOF >$dummy.c
  581. #undef CPU
  582. - #undef mips64
  583. - #undef mips64el
  584. + #undef ${UNAME_MACHINE}
  585. + #undef ${UNAME_MACHINE}el
  586. #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
  587. - CPU=mips64el
  588. + CPU=${UNAME_MACHINE}el
  589. #else
  590. #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
  591. - CPU=mips64
  592. + CPU=${UNAME_MACHINE}
  593. #else
  594. CPU=
  595. #endif
  596. #endif
  597. EOF
  598. - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
  599. - /^CPU/{
  600. - s: ::g
  601. - p
  602. - }'`"
  603. - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
  604. + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
  605. + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
  606. ;;
  607. - or32:Linux:*:*)
  608. - echo or32-unknown-linux-gnu
  609. + or1k:Linux:*:*)
  610. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  611. exit ;;
  612. - ppc:Linux:*:*)
  613. - echo powerpc-unknown-linux-gnu
  614. + or32:Linux:*:*)
  615. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  616. exit ;;
  617. - ppc64:Linux:*:*)
  618. - echo powerpc64-unknown-linux-gnu
  619. + padre:Linux:*:*)
  620. + echo sparc-unknown-linux-${LIBC}
  621. exit ;;
  622. - alpha:Linux:*:*)
  623. - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
  624. - EV5) UNAME_MACHINE=alphaev5 ;;
  625. - EV56) UNAME_MACHINE=alphaev56 ;;
  626. - PCA56) UNAME_MACHINE=alphapca56 ;;
  627. - PCA57) UNAME_MACHINE=alphapca56 ;;
  628. - EV6) UNAME_MACHINE=alphaev6 ;;
  629. - EV67) UNAME_MACHINE=alphaev67 ;;
  630. - EV68*) UNAME_MACHINE=alphaev68 ;;
  631. - esac
  632. - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
  633. - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
  634. - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
  635. + parisc64:Linux:*:* | hppa64:Linux:*:*)
  636. + echo hppa64-unknown-linux-${LIBC}
  637. exit ;;
  638. parisc:Linux:*:* | hppa:Linux:*:*)
  639. # Look for CPU level
  640. case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
  641. - PA7*) echo hppa1.1-unknown-linux-gnu ;;
  642. - PA8*) echo hppa2.0-unknown-linux-gnu ;;
  643. - *) echo hppa-unknown-linux-gnu ;;
  644. + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
  645. + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
  646. + *) echo hppa-unknown-linux-${LIBC} ;;
  647. esac
  648. exit ;;
  649. - parisc64:Linux:*:* | hppa64:Linux:*:*)
  650. - echo hppa64-unknown-linux-gnu
  651. + ppc64:Linux:*:*)
  652. + echo powerpc64-unknown-linux-${LIBC}
  653. + exit ;;
  654. + ppc:Linux:*:*)
  655. + echo powerpc-unknown-linux-${LIBC}
  656. + exit ;;
  657. + ppc64le:Linux:*:*)
  658. + echo powerpc64le-unknown-linux-${LIBC}
  659. + exit ;;
  660. + ppcle:Linux:*:*)
  661. + echo powerpcle-unknown-linux-${LIBC}
  662. exit ;;
  663. s390:Linux:*:* | s390x:Linux:*:*)
  664. - echo ${UNAME_MACHINE}-ibm-linux
  665. + echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
  666. exit ;;
  667. sh64*:Linux:*:*)
  668. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  669. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  670. exit ;;
  671. sh*:Linux:*:*)
  672. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  673. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  674. exit ;;
  675. sparc:Linux:*:* | sparc64:Linux:*:*)
  676. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  677. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  678. + exit ;;
  679. + tile*:Linux:*:*)
  680. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  681. exit ;;
  682. vax:Linux:*:*)
  683. - echo ${UNAME_MACHINE}-dec-linux-gnu
  684. + echo ${UNAME_MACHINE}-dec-linux-${LIBC}
  685. exit ;;
  686. x86_64:Linux:*:*)
  687. - echo x86_64-unknown-linux-gnu
  688. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  689. exit ;;
  690. xtensa*:Linux:*:*)
  691. - echo ${UNAME_MACHINE}-unknown-linux-gnu
  692. + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
  693. exit ;;
  694. - i*86:Linux:*:*)
  695. - # The BFD linker knows what the default object file format is, so
  696. - # first see if it will tell us. cd to the root directory to prevent
  697. - # problems with other programs or directories called `ld' in the path.
  698. - # Set LC_ALL=C to ensure ld outputs messages in English.
  699. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
  700. - | sed -ne '/supported targets:/!d
  701. - s/[ ][ ]*/ /g
  702. - s/.*supported targets: *//
  703. - s/ .*//
  704. - p'`
  705. - case "$ld_supported_targets" in
  706. - elf32-i386)
  707. - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
  708. - ;;
  709. - a.out-i386-linux)
  710. - echo "${UNAME_MACHINE}-pc-linux-gnuaout"
  711. - exit ;;
  712. - coff-i386)
  713. - echo "${UNAME_MACHINE}-pc-linux-gnucoff"
  714. - exit ;;
  715. - "")
  716. - # Either a pre-BFD a.out linker (linux-gnuoldld) or
  717. - # one that does not give us useful --help.
  718. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
  719. - exit ;;
  720. - esac
  721. - # Determine whether the default compiler is a.out or elf
  722. - eval $set_cc_for_build
  723. - sed 's/^ //' << EOF >$dummy.c
  724. - #include <features.h>
  725. - #ifdef __ELF__
  726. - # ifdef __GLIBC__
  727. - # if __GLIBC__ >= 2
  728. - LIBC=gnu
  729. - # else
  730. - LIBC=gnulibc1
  731. - # endif
  732. - # else
  733. - LIBC=gnulibc1
  734. - # endif
  735. - #else
  736. - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
  737. - LIBC=gnu
  738. - #else
  739. - LIBC=gnuaout
  740. - #endif
  741. - #endif
  742. - #ifdef __dietlibc__
  743. - LIBC=dietlibc
  744. - #endif
  745. -EOF
  746. - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
  747. - /^LIBC/{
  748. - s: ::g
  749. - p
  750. - }'`"
  751. - test x"${LIBC}" != x && {
  752. - echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
  753. - exit
  754. - }
  755. - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
  756. - ;;
  757. i*86:DYNIX/ptx:4*:*)
  758. # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
  759. # earlier versions are messed up and put the nodename in both
  760. @@ -1037,11 +1032,11 @@ EOF
  761. echo i386-sequent-sysv4
  762. exit ;;
  763. i*86:UNIX_SV:4.2MP:2.*)
  764. - # Unixware is an offshoot of SVR4, but it has its own version
  765. - # number series starting with 2...
  766. - # I am not positive that other SVR4 systems won't match this,
  767. + # Unixware is an offshoot of SVR4, but it has its own version
  768. + # number series starting with 2...
  769. + # I am not positive that other SVR4 systems won't match this,
  770. # I just have to hope. -- rms.
  771. - # Use sysv4.2uw... so that sysv4* matches it.
  772. + # Use sysv4.2uw... so that sysv4* matches it.
  773. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
  774. exit ;;
  775. i*86:OS/2:*:*)
  776. @@ -1058,7 +1053,7 @@ EOF
  777. i*86:syllable:*:*)
  778. echo ${UNAME_MACHINE}-pc-syllable
  779. exit ;;
  780. - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
  781. + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
  782. echo i386-unknown-lynxos${UNAME_RELEASE}
  783. exit ;;
  784. i*86:*DOS:*:*)
  785. @@ -1073,7 +1068,7 @@ EOF
  786. fi
  787. exit ;;
  788. i*86:*:5:[678]*)
  789. - # UnixWare 7.x, OpenUNIX and OpenServer 6.
  790. + # UnixWare 7.x, OpenUNIX and OpenServer 6.
  791. case `/bin/uname -X | grep "^Machine"` in
  792. *486*) UNAME_MACHINE=i486 ;;
  793. *Pentium) UNAME_MACHINE=i586 ;;
  794. @@ -1101,10 +1096,13 @@ EOF
  795. exit ;;
  796. pc:*:*:*)
  797. # Left here for compatibility:
  798. - # uname -m prints for DJGPP always 'pc', but it prints nothing about
  799. - # the processor, so we play safe by assuming i386.
  800. - echo i386-pc-msdosdjgpp
  801. - exit ;;
  802. + # uname -m prints for DJGPP always 'pc', but it prints nothing about
  803. + # the processor, so we play safe by assuming i586.
  804. + # Note: whatever this is, it MUST be the same as what config.sub
  805. + # prints for the "djgpp" host, or else GDB configury will decide that
  806. + # this is a cross-build.
  807. + echo i586-pc-msdosdjgpp
  808. + exit ;;
  809. Intel:Mach:3*:*)
  810. echo i386-pc-mach3
  811. exit ;;
  812. @@ -1139,8 +1137,18 @@ EOF
  813. /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
  814. && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
  815. 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
  816. - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  817. - && { echo i486-ncr-sysv4; exit; } ;;
  818. + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  819. + && { echo i486-ncr-sysv4; exit; } ;;
  820. + NCR*:*:4.2:* | MPRAS*:*:4.2:*)
  821. + OS_REL='.3'
  822. + test -r /etc/.relid \
  823. + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
  824. + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
  825. + && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
  826. + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
  827. + && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
  828. + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
  829. + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
  830. m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
  831. echo m68k-unknown-lynxos${UNAME_RELEASE}
  832. exit ;;
  833. @@ -1153,7 +1161,7 @@ EOF
  834. rs6000:LynxOS:2.*:*)
  835. echo rs6000-unknown-lynxos${UNAME_RELEASE}
  836. exit ;;
  837. - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
  838. + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
  839. echo powerpc-unknown-lynxos${UNAME_RELEASE}
  840. exit ;;
  841. SM[BE]S:UNIX_SV:*:*)
  842. @@ -1173,10 +1181,10 @@ EOF
  843. echo ns32k-sni-sysv
  844. fi
  845. exit ;;
  846. - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
  847. - # says <Richard.M.Bartel@ccMail.Census.GOV>
  848. - echo i586-unisys-sysv4
  849. - exit ;;
  850. + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
  851. + # says <Richard.M.Bartel@ccMail.Census.GOV>
  852. + echo i586-unisys-sysv4
  853. + exit ;;
  854. *:UNIX_System_V:4*:FTX*)
  855. # From Gerald Hewes <hewes@openmarket.com>.
  856. # How about differentiating between stratus architectures? -djm
  857. @@ -1202,11 +1210,11 @@ EOF
  858. exit ;;
  859. R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
  860. if [ -d /usr/nec ]; then
  861. - echo mips-nec-sysv${UNAME_RELEASE}
  862. + echo mips-nec-sysv${UNAME_RELEASE}
  863. else
  864. - echo mips-unknown-sysv${UNAME_RELEASE}
  865. + echo mips-unknown-sysv${UNAME_RELEASE}
  866. fi
  867. - exit ;;
  868. + exit ;;
  869. BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
  870. echo powerpc-be-beos
  871. exit ;;
  872. @@ -1216,6 +1224,12 @@ EOF
  873. BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
  874. echo i586-pc-beos
  875. exit ;;
  876. + BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
  877. + echo i586-pc-haiku
  878. + exit ;;
  879. + x86_64:Haiku:*:*)
  880. + echo x86_64-unknown-haiku
  881. + exit ;;
  882. SX-4:SUPER-UX:*:*)
  883. echo sx4-nec-superux${UNAME_RELEASE}
  884. exit ;;
  885. @@ -1242,9 +1256,31 @@ EOF
  886. exit ;;
  887. *:Darwin:*:*)
  888. UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
  889. - case $UNAME_PROCESSOR in
  890. - unknown) UNAME_PROCESSOR=powerpc ;;
  891. - esac
  892. + eval $set_cc_for_build
  893. + if test "$UNAME_PROCESSOR" = unknown ; then
  894. + UNAME_PROCESSOR=powerpc
  895. + fi
  896. + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then
  897. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
  898. + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
  899. + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
  900. + grep IS_64BIT_ARCH >/dev/null
  901. + then
  902. + case $UNAME_PROCESSOR in
  903. + i386) UNAME_PROCESSOR=x86_64 ;;
  904. + powerpc) UNAME_PROCESSOR=powerpc64 ;;
  905. + esac
  906. + fi
  907. + fi
  908. + elif test "$UNAME_PROCESSOR" = i386 ; then
  909. + # Avoid executing cc on OS X 10.9, as it ships with a stub
  910. + # that puts up a graphical alert prompting to install
  911. + # developer tools. Any system running Mac OS X 10.7 or
  912. + # later (Darwin 11 and later) is required to have a 64-bit
  913. + # processor. This is not true of the ARM version of Darwin
  914. + # that Apple uses in portable devices.
  915. + UNAME_PROCESSOR=x86_64
  916. + fi
  917. echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
  918. exit ;;
  919. *:procnto*:*:* | *:QNX:[0123456789]*:*)
  920. @@ -1258,7 +1294,10 @@ EOF
  921. *:QNX:*:4*)
  922. echo i386-pc-qnx
  923. exit ;;
  924. - NSE-?:NONSTOP_KERNEL:*:*)
  925. + NEO-?:NONSTOP_KERNEL:*:*)
  926. + echo neo-tandem-nsk${UNAME_RELEASE}
  927. + exit ;;
  928. + NSE-*:NONSTOP_KERNEL:*:*)
  929. echo nse-tandem-nsk${UNAME_RELEASE}
  930. exit ;;
  931. NSR-?:NONSTOP_KERNEL:*:*)
  932. @@ -1303,13 +1342,13 @@ EOF
  933. echo pdp10-unknown-its
  934. exit ;;
  935. SEI:*:*:SEIUX)
  936. - echo mips-sei-seiux${UNAME_RELEASE}
  937. + echo mips-sei-seiux${UNAME_RELEASE}
  938. exit ;;
  939. *:DragonFly:*:*)
  940. echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
  941. exit ;;
  942. *:*VMS:*:*)
  943. - UNAME_MACHINE=`(uname -p) 2>/dev/null`
  944. + UNAME_MACHINE=`(uname -p) 2>/dev/null`
  945. case "${UNAME_MACHINE}" in
  946. A*) echo alpha-dec-vms ; exit ;;
  947. I*) echo ia64-dec-vms ; exit ;;
  948. @@ -1324,158 +1363,13 @@ EOF
  949. i*86:rdos:*:*)
  950. echo ${UNAME_MACHINE}-pc-rdos
  951. exit ;;
  952. -esac
  953. -
  954. -#echo '(No uname command or uname output not recognized.)' 1>&2
  955. -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
  956. -
  957. -eval $set_cc_for_build
  958. -cat >$dummy.c <<EOF
  959. -#ifdef _SEQUENT_
  960. -# include <sys/types.h>
  961. -# include <sys/utsname.h>
  962. -#endif
  963. -main ()
  964. -{
  965. -#if defined (sony)
  966. -#if defined (MIPSEB)
  967. - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
  968. - I don't know.... */
  969. - printf ("mips-sony-bsd\n"); exit (0);
  970. -#else
  971. -#include <sys/param.h>
  972. - printf ("m68k-sony-newsos%s\n",
  973. -#ifdef NEWSOS4
  974. - "4"
  975. -#else
  976. - ""
  977. -#endif
  978. - ); exit (0);
  979. -#endif
  980. -#endif
  981. -
  982. -#if defined (__arm) && defined (__acorn) && defined (__unix)
  983. - printf ("arm-acorn-riscix\n"); exit (0);
  984. -#endif
  985. -
  986. -#if defined (hp300) && !defined (hpux)
  987. - printf ("m68k-hp-bsd\n"); exit (0);
  988. -#endif
  989. -
  990. -#if defined (NeXT)
  991. -#if !defined (__ARCHITECTURE__)
  992. -#define __ARCHITECTURE__ "m68k"
  993. -#endif
  994. - int version;
  995. - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
  996. - if (version < 4)
  997. - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
  998. - else
  999. - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
  1000. - exit (0);
  1001. -#endif
  1002. -
  1003. -#if defined (MULTIMAX) || defined (n16)
  1004. -#if defined (UMAXV)
  1005. - printf ("ns32k-encore-sysv\n"); exit (0);
  1006. -#else
  1007. -#if defined (CMU)
  1008. - printf ("ns32k-encore-mach\n"); exit (0);
  1009. -#else
  1010. - printf ("ns32k-encore-bsd\n"); exit (0);
  1011. -#endif
  1012. -#endif
  1013. -#endif
  1014. -
  1015. -#if defined (__386BSD__)
  1016. - printf ("i386-pc-bsd\n"); exit (0);
  1017. -#endif
  1018. -
  1019. -#if defined (sequent)
  1020. -#if defined (i386)
  1021. - printf ("i386-sequent-dynix\n"); exit (0);
  1022. -#endif
  1023. -#if defined (ns32000)
  1024. - printf ("ns32k-sequent-dynix\n"); exit (0);
  1025. -#endif
  1026. -#endif
  1027. -
  1028. -#if defined (_SEQUENT_)
  1029. - struct utsname un;
  1030. -
  1031. - uname(&un);
  1032. -
  1033. - if (strncmp(un.version, "V2", 2) == 0) {
  1034. - printf ("i386-sequent-ptx2\n"); exit (0);
  1035. - }
  1036. - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
  1037. - printf ("i386-sequent-ptx1\n"); exit (0);
  1038. - }
  1039. - printf ("i386-sequent-ptx\n"); exit (0);
  1040. -
  1041. -#endif
  1042. -
  1043. -#if defined (vax)
  1044. -# if !defined (ultrix)
  1045. -# include <sys/param.h>
  1046. -# if defined (BSD)
  1047. -# if BSD == 43
  1048. - printf ("vax-dec-bsd4.3\n"); exit (0);
  1049. -# else
  1050. -# if BSD == 199006
  1051. - printf ("vax-dec-bsd4.3reno\n"); exit (0);
  1052. -# else
  1053. - printf ("vax-dec-bsd\n"); exit (0);
  1054. -# endif
  1055. -# endif
  1056. -# else
  1057. - printf ("vax-dec-bsd\n"); exit (0);
  1058. -# endif
  1059. -# else
  1060. - printf ("vax-dec-ultrix\n"); exit (0);
  1061. -# endif
  1062. -#endif
  1063. -
  1064. -#if defined (alliant) && defined (i860)
  1065. - printf ("i860-alliant-bsd\n"); exit (0);
  1066. -#endif
  1067. -
  1068. - exit (1);
  1069. -}
  1070. -EOF
  1071. -
  1072. -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
  1073. - { echo "$SYSTEM_NAME"; exit; }
  1074. -
  1075. -# Apollos put the system type in the environment.
  1076. -
  1077. -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
  1078. -
  1079. -# Convex versions that predate uname can use getsysinfo(1)
  1080. -
  1081. -if [ -x /usr/convex/getsysinfo ]
  1082. -then
  1083. - case `getsysinfo -f cpu_type` in
  1084. - c1*)
  1085. - echo c1-convex-bsd
  1086. - exit ;;
  1087. - c2*)
  1088. - if getsysinfo -f scalar_acc
  1089. - then echo c32-convex-bsd
  1090. - else echo c2-convex-bsd
  1091. - fi
  1092. - exit ;;
  1093. - c34*)
  1094. - echo c34-convex-bsd
  1095. - exit ;;
  1096. - c38*)
  1097. - echo c38-convex-bsd
  1098. + i*86:AROS:*:*)
  1099. + echo ${UNAME_MACHINE}-pc-aros
  1100. exit ;;
  1101. - c4*)
  1102. - echo c4-convex-bsd
  1103. + x86_64:VMkernel:*:*)
  1104. + echo ${UNAME_MACHINE}-unknown-esx
  1105. exit ;;
  1106. - esac
  1107. -fi
  1108. +esac
  1109. cat >&2 <<EOF
  1110. $0: unable to guess system type