patch-lib_win32_pcre_config_guess 34 KB

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