| | | |
Offset 0, 0 lines modified | Offset 1, 1754 lines modified |
| 1 | #!·/bin/sh |
| 2 | #·Attempt·to·guess·a·canonical·system·name. |
| 3 | #···Copyright·1992-2022·Free·Software·Foundation,·Inc. |
| |
| 4 | #·shellcheck·disable=SC2006,SC2268·#·see·below·for·rationale |
| |
| 5 | timestamp='2022-01-09' |
| |
| 6 | #·This·file·is·free·software;·you·can·redistribute·it·and/or·modify·it |
| 7 | #·under·the·terms·of·the·GNU·General·Public·License·as·published·by |
| 8 | #·the·Free·Software·Foundation,·either·version·3·of·the·License,·or |
| 9 | #·(at·your·option)·any·later·version. |
| 10 | # |
| 11 | #·This·program·is·distributed·in·the·hope·that·it·will·be·useful,·but |
| 12 | #·WITHOUT·ANY·WARRANTY;·without·even·the·implied·warranty·of |
| 13 | #·MERCHANTABILITY·or·FITNESS·FOR·A·PARTICULAR·PURPOSE.··See·the·GNU |
| 14 | #·General·Public·License·for·more·details. |
| 15 | # |
| 16 | #·You·should·have·received·a·copy·of·the·GNU·General·Public·License |
| 17 | #·along·with·this·program;·if·not,·see·<https://www.gnu.org/licenses/>. |
| 18 | # |
| 19 | #·As·a·special·exception·to·the·GNU·General·Public·License,·if·you |
| 20 | #·distribute·this·file·as·part·of·a·program·that·contains·a |
| 21 | #·configuration·script·generated·by·Autoconf,·you·may·include·it·under |
| 22 | #·the·same·distribution·terms·that·you·use·for·the·rest·of·that |
| 23 | #·program.··This·Exception·is·an·additional·permission·under·section·7 |
| 24 | #·of·the·GNU·General·Public·License,·version·3·("GPLv3"). |
| 25 | # |
| 26 | #·Originally·written·by·Per·Bothner;·maintained·since·2000·by·Ben·Elliston. |
| 27 | # |
| 28 | #·You·can·get·the·latest·version·of·this·script·from: |
| 29 | #·https://git.savannah.gnu.org/cgit/config.git/plain/config.guess |
| 30 | # |
| 31 | #·Please·send·patches·to·<config-patches@gnu.org>. |
| |
| |
| 32 | #·The·"shellcheck·disable"·line·above·the·timestamp·inhibits·complaints |
| 33 | #·about·features·and·limitations·of·the·classic·Bourne·shell·that·were |
| 34 | #·superseded·or·lifted·in·POSIX.··However,·this·script·identifies·a·wide |
| 35 | #·variety·of·pre-POSIX·systems·that·do·not·have·POSIX·shells·at·all,·and |
| 36 | #·even·some·reasonably·current·systems·(Solaris·10·as·case-in-point)·still |
| 37 | #·have·a·pre-POSIX·/bin/sh. |
| |
| |
| 38 | me=`echo·"$0"·|·sed·-e·'s,.*/,,'` |
| |
| 39 | usage="\ |
| 40 | Usage:·$0·[OPTION] |
| |
| 41 | Output·the·configuration·name·of·the·system·\`$me'·is·run·on. |
| |
| 42 | Options: |
| 43 | ··-h,·--help·········print·this·help,·then·exit |
| 44 | ··-t,·--time-stamp···print·date·of·last·modification,·then·exit |
| 45 | ··-v,·--version······print·version·number,·then·exit |
| |
| 46 | Report·bugs·and·patches·to·<config-patches@gnu.org>." |
| |
| 47 | version="\ |
| 48 | GNU·config.guess·($timestamp) |
| |
| 49 | Originally·written·by·Per·Bothner. |
| 50 | Copyright·1992-2022·Free·Software·Foundation,·Inc. |
| |
| 51 | This·is·free·software;·see·the·source·for·copying·conditions.··There·is·NO |
| 52 | warranty;·not·even·for·MERCHANTABILITY·or·FITNESS·FOR·A·PARTICULAR·PURPOSE." |
| |
| 53 | help=" |
| 54 | Try·\`$me·--help'·for·more·information." |
| |
| 55 | #·Parse·command·line |
| 56 | while·test·$#·-gt·0·;·do |
| 57 | ··case·$1·in |
| 58 | ····--time-stamp·|·--time*·|·-t·) |
| 59 | ·······echo·"$timestamp"·;·exit·;; |
| 60 | ····--version·|·-v·) |
| 61 | ·······echo·"$version"·;·exit·;; |
| 62 | ····--help·|·--h*·|·-h·) |
| 63 | ·······echo·"$usage";·exit·;; |
| 64 | ····--·)·····#·Stop·option·processing |
| 65 | ·······shift;·break·;; |
| 66 | ····-·)» #·Use·stdin·as·input. |
| 67 | ·······break·;; |
| 68 | ····-*·) |
| 69 | ·······echo·"$me:·invalid·option·$1$help"·>&2 |
| 70 | ·······exit·1·;; |
| 71 | ····*·) |
| 72 | ·······break·;; |
| 73 | ··esac |
| 74 | done |
| |
| 75 | if·test·$#·!=·0;·then |
| 76 | ··echo·"$me:·too·many·arguments$help"·>&2 |
| 77 | ··exit·1 |
| 78 | fi |
| |
| 79 | #·Just·in·case·it·came·from·the·environment. |
| 80 | GUESS= |
| |
| 81 | #·CC_FOR_BUILD·--·compiler·used·by·this·script.·Note·that·the·use·of·a |
| 82 | #·compiler·to·aid·in·system·detection·is·discouraged·as·it·requires |
| 83 | #·temporary·files·to·be·created·and,·as·you·can·see·below,·it·is·a |
| 84 | #·headache·to·deal·with·in·a·portable·fashion. |
| |
| 85 | #·Historically,·`CC_FOR_BUILD'·used·to·be·named·`HOST_CC'.·We·still |
| 86 | #·use·`HOST_CC'·if·defined,·but·it·is·deprecated. |
| |
| 87 | #·Portable·tmp·directory·creation·inspired·by·the·Autoconf·team. |
| |
| 88 | tmp= |
| 89 | #·shellcheck·disable=SC2172 |
| 90 | trap·'test·-z·"$tmp"·||·rm·-fr·"$tmp"'·0·1·2·13·15 |
| |
| 91 | set_cc_for_build()·{ |
| 92 | ····#·prevent·multiple·calls·if·$tmp·is·already·set |
| 93 | ····test·"$tmp"·&&·return·0 |
| 94 | ····:·"${TMPDIR=/tmp}" |
| 95 | ····#·shellcheck·disable=SC2039,SC3028 |
| 96 | ····{·tmp=`(umask·077·&&·mktemp·-d·"$TMPDIR/cgXXXXXX")·2>/dev/null`·&&·test·-n·"$tmp"·&&·test·-d·"$tmp"·;·}·|| |
| 97 | » {·test·-n·"$RANDOM"·&&·tmp=$TMPDIR/cg$$-$RANDOM·&&·(umask·077·&&·mkdir·"$tmp"·2>/dev/null)·;·}·|| |
| 98 | » {·tmp=$TMPDIR/cg-$$·&&·(umask·077·&&·mkdir·"$tmp"·2>/dev/null)·&&·echo·"Warning:·creating·insecure·temp·directory"·>&2·;·}·|| |
| 99 | » {·echo·"$me:·cannot·create·a·temporary·directory·in·$TMPDIR"·>&2·;·exit·1·;·} |
| 100 | ····dummy=$tmp/dummy |
| 101 | ····case·${CC_FOR_BUILD-},${HOST_CC-},${CC-}·in |
| 102 | » ,,)····echo·"int·x;"·>·"$dummy.c" |
| 103 | » ·······for·driver·in·cc·gcc·c89·c99·;·do |
| 104 | » » ···if·($driver·-c·-o·"$dummy.o"·"$dummy.c")·>/dev/null·2>&1·;·then |
| 105 | » » ·······CC_FOR_BUILD=$driver |
| 106 | » » ·······break |
| 107 | » » ···fi |
| 108 | » ·······done |
| 109 | » ·······if·test·x"$CC_FOR_BUILD"·=·x·;·then |
| 110 | » » ···CC_FOR_BUILD=no_compiler_found |
| 111 | » ·······fi |
| 112 | » ·······;; |
| 113 | » ,,*)···CC_FOR_BUILD=$CC·;; |
| 114 | » ,*,*)··CC_FOR_BUILD=$HOST_CC·;; |
| 115 | ····esac |
| 116 | } |
| |
| 117 | #·This·is·needed·to·find·uname·on·a·Pyramid·OSx·when·run·in·the·BSD·universe. |
| 118 | #·(ghazi@noc.rutgers.edu·1994-08-24) |
| 119 | if·test·-f·/.attbin/uname·;·then |
| 120 | » PATH=$PATH:/.attbin·;·export·PATH |
| 121 | fi |
| |
| 122 | UNAME_MACHINE=`(uname·-m)·2>/dev/null`·||·UNAME_MACHINE=unknown |
| 123 | UNAME_RELEASE=`(uname·-r)·2>/dev/null`·||·UNAME_RELEASE=unknown |
| 124 | UNAME_SYSTEM=`(uname·-s)·2>/dev/null`·||·UNAME_SYSTEM=unknown |
| 125 | UNAME_VERSION=`(uname·-v)·2>/dev/null`·||·UNAME_VERSION=unknown |
| |
| 126 | case·$UNAME_SYSTEM·in |
| 127 | Linux|GNU|GNU/*) |
| 128 | » LIBC=unknown |
| |
| 129 | » set_cc_for_build |
| 130 | » cat·<<-EOF·>·"$dummy.c" |
| 131 | » #include·<features.h> |
| 132 | » #if·defined(__UCLIBC__) |
| 133 | » LIBC=uclibc |
| 134 | » #elif·defined(__dietlibc__) |
| 135 | » LIBC=dietlibc |
| 136 | » #elif·defined(__GLIBC__) |
| 137 | » LIBC=gnu |
| 138 | » #else |
| 139 | » #include·<stdarg.h> |
| 140 | » /*·First·heuristic·to·detect·musl·libc.··*/ |
| 141 | » #ifdef·__DEFINED_va_list |
| 142 | » LIBC=musl |
| 143 | » #endif |
| 144 | » #endif |
| 145 | » EOF |
| 146 | » cc_set_libc=`$CC_FOR_BUILD·-E·"$dummy.c"·2>/dev/null·|·grep·'^LIBC'·|·sed·'s,·,,g'` |
| 147 | » eval·"$cc_set_libc" |
| |
| 148 | » #·Second·heuristic·to·detect·musl·libc. |
| 149 | » if·[·"$LIBC"·=·unknown·]·&& |
| 150 | » ···command·-v·ldd·>/dev/null·&& |
| 151 | » ···ldd·--version·2>&1·|·grep·-q·^musl;·then |
| 152 | » » LIBC=musl |
| 153 | » fi |
| |
| 154 | » #·If·the·system·lacks·a·compiler,·then·just·pick·glibc. |
| 155 | » #·We·could·probably·try·harder. |
| 156 | » if·[·"$LIBC"·=·unknown·];·then |
| 157 | » » LIBC=gnu |
| 158 | » fi |
| 159 | » ;; |
| 160 | esac |
| |
| 161 | #·Note:·order·is·significant·-·the·case·branches·are·not·exclusive. |
| |
| 162 | case·$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION·in |
| 163 | ····*:NetBSD:*:*) |
| 164 | » #·NetBSD·(nbsd)·targets·should·(where·applicable)·match·one·or |
| 165 | » #·more·of·the·tuples:·*-*-netbsdelf*,·*-*-netbsdaout*, |
| 166 | » #·*-*-netbsdecoff*·and·*-*-netbsd*.··For·targets·that·recently |
| 167 | » #·switched·to·ELF,·*-*-netbsd*·would·select·the·old |
| 168 | » #·object·file·format.··This·provides·both·forward |
| 169 | » #·compatibility·and·a·consistent·mechanism·for·selecting·the |
| 170 | » #·object·file·format. |
| 171 | » # |
| 172 | » #·Note:·NetBSD·doesn't·particularly·care·about·the·vendor |
| 173 | » #·portion·of·the·name.··We·always·set·it·to·"unknown". |
| 174 | » UNAME_MACHINE_ARCH=`(uname·-p·2>/dev/null·||·\ |
| 175 | » ····/sbin/sysctl·-n·hw.machine_arch·2>/dev/null·||·\ |
| 176 | » ····/usr/sbin/sysctl·-n·hw.machine_arch·2>/dev/null·||·\ |
| 177 | » ····echo·unknown)` |
| 178 | » case·$UNAME_MACHINE_ARCH·in |
| 179 | » ····aarch64eb)·machine=aarch64_be-unknown·;; |
| 180 | » ····armeb)·machine=armeb-unknown·;; |
| 181 | » ····arm*)·machine=arm-unknown·;; |
| 182 | » ····sh3el)·machine=shl-unknown·;; |
| 183 | » ····sh3eb)·machine=sh-unknown·;; |
| 184 | » ····sh5el)·machine=sh5le-unknown·;; |
| 185 | » ····earmv*) |
| 186 | » » arch=`echo·"$UNAME_MACHINE_ARCH"·|·sed·-e·'s,^e\(armv[0-9]\).*$,\1,'` |
| 187 | » » endian=`echo·"$UNAME_MACHINE_ARCH"·|·sed·-ne·'s,^.*\(eb\)$,\1,p'` |
| 188 | » » machine=${arch}${endian}-unknown |
| 189 | » » ;; |
| 190 | » ····*)·machine=$UNAME_MACHINE_ARCH-unknown·;; |
| 191 | » esac |
| 192 | » #·The·Operating·System·including·object·format,·if·it·has·switched |
| 193 | » #·to·ELF·recently·(or·will·in·the·future)·and·ABI. |
| 194 | » case·$UNAME_MACHINE_ARCH·in |
| 195 | » ····earm*) |
| 196 | » » os=netbsdelf |
| 197 | » » ;; |
| 198 | » ····arm*|i386|m68k|ns32k|sh3*|sparc|vax) |
| 199 | » » set_cc_for_build |
| 200 | » » if·echo·__ELF__·|·$CC_FOR_BUILD·-E·-·2>/dev/null·\ |
| 201 | » » » |·grep·-q·__ELF__ |
| 202 | » » then |
| 203 | » » ····#·Once·all·utilities·can·be·ECOFF·(netbsdecoff)·or·a.out·(netbsdaout). |
| 204 | » » ····#·Return·netbsd·for·either.··FIX? |
| 205 | » » ····os=netbsd |
| 206 | » » else |
| 207 | » » ····os=netbsdelf |
| 208 | » » fi |
| 209 | » » ;; |
| 210 | » ····*) |
| 211 | » » os=netbsd |
| 212 | » » ;; |
| 213 | » esac |
| 214 | » #·Determine·ABI·tags. |
| 215 | » case·$UNAME_MACHINE_ARCH·in |
| 216 | » ····earm*) |
| 217 | » » expr='s/^earmv[0-9]/-eabi/;s/eb$//' |
| 218 | » » abi=`echo·"$UNAME_MACHINE_ARCH"·|·sed·-e·"$expr"` |
| 219 | » » ;; |
| 220 | » esac |
| 221 | » #·The·OS·release |
| 222 | » #·Debian·GNU/NetBSD·machines·have·a·different·userland,·and |
| 223 | » #·thus,·need·a·distinct·triplet.·However,·they·do·not·need |
| 224 | » #·kernel·version·information,·so·it·can·be·replaced·with·a |
| 225 | » #·suitable·tag,·in·the·style·of·linux-gnu. |
| 226 | » case·$UNAME_VERSION·in |
| 227 | » ····Debian*) |
| 228 | » » release='-gnu' |
| 229 | » » ;; |
| 230 | » ····*) |
| 231 | » » release=`echo·"$UNAME_RELEASE"·|·sed·-e·'s/[-_].*//'·|·cut·-d.·-f1,2` |
| 232 | » » ;; |
| 233 | » esac |
| 234 | » #·Since·CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: |
| 235 | » #·contains·redundant·information,·the·shorter·form: |
| 236 | » #·CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM·is·used. |
| 237 | » GUESS=$machine-${os}${release}${abi-} |
| 238 | » ;; |
| 239 | ····*:Bitrig:*:*) |
| 240 | » UNAME_MACHINE_ARCH=`arch·|·sed·'s/Bitrig.//'` |
| 241 | » GUESS=$UNAME_MACHINE_ARCH-unknown-bitrig$UNAME_RELEASE |
| 242 | » ;; |
| 243 | ····*:OpenBSD:*:*) |
| 244 | » UNAME_MACHINE_ARCH=`arch·|·sed·'s/OpenBSD.//'` |
| 245 | » GUESS=$UNAME_MACHINE_ARCH-unknown-openbsd$UNAME_RELEASE |
| 246 | » ;; |
| 247 | ····*:SecBSD:*:*) |
| 248 | » UNAME_MACHINE_ARCH=`arch·|·sed·'s/SecBSD.//'` |
| 249 | » GUESS=$UNAME_MACHINE_ARCH-unknown-secbsd$UNAME_RELEASE |
| 250 | » ;; |
| 251 | ····*:LibertyBSD:*:*) |
| 252 | » UNAME_MACHINE_ARCH=`arch·|·sed·'s/^.*BSD\.//'` |
| 253 | » GUESS=$UNAME_MACHINE_ARCH-unknown-libertybsd$UNAME_RELEASE |
| 254 | » ;; |
| 255 | ····*:MidnightBSD:*:*) |
| 256 | » GUESS=$UNAME_MACHINE-unknown-midnightbsd$UNAME_RELEASE |
| 257 | » ;; |
| 258 | ····*:ekkoBSD:*:*) |
| 259 | » GUESS=$UNAME_MACHINE-unknown-ekkobsd$UNAME_RELEASE |
| 260 | » ;; |
| 261 | ····*:SolidBSD:*:*) |
| 262 | » GUESS=$UNAME_MACHINE-unknown-solidbsd$UNAME_RELEASE |
| 263 | » ;; |
| 264 | ····*:OS108:*:*) |
| 265 | » GUESS=$UNAME_MACHINE-unknown-os108_$UNAME_RELEASE |
| 266 | » ;; |
| 267 | ····macppc:MirBSD:*:*) |
| 268 | » GUESS=powerpc-unknown-mirbsd$UNAME_RELEASE |
| 269 | » ;; |
| 270 | ····*:MirBSD:*:*) |
| 271 | » GUESS=$UNAME_MACHINE-unknown-mirbsd$UNAME_RELEASE |
| 272 | » ;; |
| 273 | ····*:Sortix:*:*) |
| 274 | » GUESS=$UNAME_MACHINE-unknown-sortix |
| 275 | » ;; |
| 276 | ····*:Twizzler:*:*) |
| 277 | » GUESS=$UNAME_MACHINE-unknown-twizzler |
| 278 | » ;; |
| 279 | ····*:Redox:*:*) |
| 280 | » GUESS=$UNAME_MACHINE-unknown-redox |
| 281 | » ;; |
| 282 | ····mips:OSF1:*.*) |
| 283 | » GUESS=mips-dec-osf1 |
| 284 | » ;; |
| 285 | ····alpha:OSF1:*:*) |
| 286 | » #·Reset·EXIT·trap·before·exiting·to·avoid·spurious·non-zero·exit·code. |
| 287 | » trap·''·0 |
| 288 | » case·$UNAME_RELEASE·in |
| 289 | » *4.0) |
| 290 | » » UNAME_RELEASE=`/usr/sbin/sizer·-v·|·awk·'{print·$3}'` |
| 291 | » » ;; |
| 292 | » *5.*) |
| 293 | » » UNAME_RELEASE=`/usr/sbin/sizer·-v·|·awk·'{print·$4}'` |
| 294 | » » ;; |
| 295 | » esac |
| 296 | » #·According·to·Compaq,·/usr/sbin/psrinfo·has·been·available·on |
| 297 | » #·OSF/1·and·Tru64·systems·produced·since·1995.··I·hope·that |
| 298 | » #·covers·most·systems·running·today.··This·code·pipes·the·CPU |
| 299 | » #·types·through·head·-n·1,·so·we·only·detect·the·type·of·CPU·0. |
| 300 | » ALPHA_CPU_TYPE=`/usr/sbin/psrinfo·-v·|·sed·-n·-e·'s/^··The·alpha·\(.*\)·processor.*$/\1/p'·|·head·-n·1` |
| 301 | » case·$ALPHA_CPU_TYPE·in |
| 302 | » ····"EV4·(21064)") |
| 303 | » » UNAME_MACHINE=alpha·;; |
| 304 | » ····"EV4.5·(21064)") |
| 305 | » » UNAME_MACHINE=alpha·;; |
| 306 | » ····"LCA4·(21066/21068)") |
| 307 | » » UNAME_MACHINE=alpha·;; |
| 308 | » ····"EV5·(21164)") |
| 309 | » » UNAME_MACHINE=alphaev5·;; |
| 310 | » ····"EV5.6·(21164A)") |
| 311 | » » UNAME_MACHINE=alphaev56·;; |
| 312 | » ····"EV5.6·(21164PC)") |
| 313 | » » UNAME_MACHINE=alphapca56·;; |
| 314 | » ····"EV5.7·(21164PC)") |
| 315 | » » UNAME_MACHINE=alphapca57·;; |
| 316 | » ····"EV6·(21264)") |
| 317 | » » UNAME_MACHINE=alphaev6·;; |
| 318 | » ····"EV6.7·(21264A)") |
| 319 | » » UNAME_MACHINE=alphaev67·;; |
| 320 | » ····"EV6.8CB·(21264C)") |
| 321 | » » UNAME_MACHINE=alphaev68·;; |
| 322 | » ····"EV6.8AL·(21264B)") |
| 323 | » » UNAME_MACHINE=alphaev68·;; |
| 324 | » ····"EV6.8CX·(21264D)") |
| 325 | » » UNAME_MACHINE=alphaev68·;; |
| 326 | » ····"EV6.9A·(21264/EV69A)") |
| 327 | » » UNAME_MACHINE=alphaev69·;; |
| 328 | » ····"EV7·(21364)") |
| 329 | » » UNAME_MACHINE=alphaev7·;; |
| 330 | » ····"EV7.9·(21364A)") |
| 331 | » » UNAME_MACHINE=alphaev79·;; |
| 332 | » esac |
| 333 | » #·A·Pn.n·version·is·a·patched·version. |
| 334 | » #·A·Vn.n·version·is·a·released·version. |
| 335 | » #·A·Tn.n·version·is·a·released·field·test·version. |
| 336 | » #·A·Xn.n·version·is·an·unreleased·experimental·baselevel. |
| 337 | » #·1.2·uses·"1.2"·for·uname·-r. |
| 338 | » OSF_REL=`echo·"$UNAME_RELEASE"·|·sed·-e·'s/^[PVTX]//'·|·tr·ABCDEFGHIJKLMNOPQRSTUVWXYZ·abcdefghijklmnopqrstuvwxyz` |
| 339 | » GUESS=$UNAME_MACHINE-dec-osf$OSF_REL |
| 340 | » ;; |
| 341 | ····Amiga*:UNIX_System_V:4.0:*) |
| 342 | » GUESS=m68k-unknown-sysv4 |
| 343 | » ;; |
| 344 | ····*:[Aa]miga[Oo][Ss]:*:*) |
| 345 | » GUESS=$UNAME_MACHINE-unknown-amigaos |
| 346 | » ;; |
| 347 | ····*:[Mm]orph[Oo][Ss]:*:*) |
| 348 | » GUESS=$UNAME_MACHINE-unknown-morphos |
| 349 | » ;; |
| 350 | ····*:OS/390:*:*) |
| 351 | » GUESS=i370-ibm-openedition |
| 352 | » ;; |
| 353 | ····*:z/VM:*:*) |
| 354 | » GUESS=s390-ibm-zvmoe |
| 355 | » ;; |
| 356 | ····*:OS400:*:*) |
| 357 | » GUESS=powerpc-ibm-os400 |
| 358 | » ;; |
| 359 | ····arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) |
| 360 | » GUESS=arm-acorn-riscix$UNAME_RELEASE |
| 361 | » ;; |
| 362 | ····arm*:riscos:*:*|arm*:RISCOS:*:*) |
| 363 | » GUESS=arm-unknown-riscos |
| 364 | » ;; |
| 365 | ····SR2?01:HI-UX/MPP:*:*·|·SR8000:HI-UX/MPP:*:*) |
| 366 | » GUESS=hppa1.1-hitachi-hiuxmpp |
| 367 | » ;; |
| 368 | ····Pyramid*:OSx*:*:*·|·MIS*:OSx*:*:*·|·MIS*:SMP_DC-OSx*:*:*) |
| 369 | » #·akee@wpdis03.wpafb.af.mil·(Earle·F.·Ake)·contributed·MIS·and·NILE. |
| 370 | » case·`(/bin/universe)·2>/dev/null`·in |
| 371 | » ····att)·GUESS=pyramid-pyramid-sysv3·;; |
| 372 | » ····*)···GUESS=pyramid-pyramid-bsd···;; |
| 373 | » esac |
| 374 | » ;; |
| 375 | ····NILE*:*:*:dcosx) |
| 376 | » GUESS=pyramid-pyramid-svr4 |
| 377 | » ;; |
| 378 | ····DRS?6000:unix:4.0:6*) |
| 379 | » GUESS=sparc-icl-nx6 |
| 380 | » ;; |
| 381 | ····DRS?6000:UNIX_SV:4.2*:7*·|·DRS?6000:isis:4.2*:7*) |
| 382 | » case·`/usr/bin/uname·-p`·in |
| 383 | » ····sparc)·GUESS=sparc-icl-nx7·;; |
| 384 | » esac |
| 385 | » ;; |
| 386 | ····s390x:SunOS:*:*) |
| 387 | » SUN_REL=`echo·"$UNAME_RELEASE"·|·sed·-e·'s/[^.]*//'` |
| 388 | » GUESS=$UNAME_MACHINE-ibm-solaris2$SUN_REL |
| 389 | » ;; |
| 390 | ····sun4H:SunOS:5.*:*) |
| 391 | » SUN_REL=`echo·"$UNAME_RELEASE"·|·sed·-e·'s/[^.]*//'` |
| 392 | » GUESS=sparc-hal-solaris2$SUN_REL |
| 393 | » ;; |
| 394 | ····sun4*:SunOS:5.*:*·|·tadpole*:SunOS:5.*:*) |
| 395 | » SUN_REL=`echo·"$UNAME_RELEASE"·|·sed·-e·'s/[^.]*//'` |
| 396 | » GUESS=sparc-sun-solaris2$SUN_REL |
| 397 | » ;; |
| 398 | ····i86pc:AuroraUX:5.*:*·|·i86xen:AuroraUX:5.*:*) |
| 399 | » GUESS=i386-pc-auroraux$UNAME_RELEASE |
| 400 | » ;; |
| 401 | ····i86pc:SunOS:5.*:*·|·i86xen:SunOS:5.*:*) |
| 402 | » set_cc_for_build |
| 403 | » SUN_ARCH=i386 |
| 404 | » #·If·there·is·a·compiler,·see·if·it·is·configured·for·64-bit·objects. |
| 405 | » #·Note·that·the·Sun·cc·does·not·turn·__LP64__·into·1·like·gcc·does. |
| 406 | » #·This·test·works·for·both·compilers. |
| 407 | » if·test·"$CC_FOR_BUILD"·!=·no_compiler_found;·then |
| 408 | » ····if·(echo·'#ifdef·__amd64';·echo·IS_64BIT_ARCH;·echo·'#endif')·|·\ |
| 409 | » » (CCOPTS=""·$CC_FOR_BUILD·-m64·-E·-·2>/dev/null)·|·\ |
| 410 | » » grep·IS_64BIT_ARCH·>/dev/null |
| 411 | » ····then |
| 412 | » » SUN_ARCH=x86_64 |
| 413 | » ····fi |
| 414 | » fi |
| 415 | » SUN_REL=`echo·"$UNAME_RELEASE"·|·sed·-e·'s/[^.]*//'` |
| 416 | » GUESS=$SUN_ARCH-pc-solaris2$SUN_REL |
| 417 | » ;; |
| 418 | ····sun4*:SunOS:6*:*) |
| 419 | » #·According·to·config.sub,·this·is·the·proper·way·to·canonicalize |
| 420 | » #·SunOS6.··Hard·to·guess·exactly·what·SunOS6·will·be·like,·but |
| 421 | » #·it's·likely·to·be·more·like·Solaris·than·SunOS4. |
| 422 | » SUN_REL=`echo·"$UNAME_RELEASE"·|·sed·-e·'s/[^.]*//'` |
| 423 | » GUESS=sparc-sun-solaris3$SUN_REL |
| 424 | » ;; |
| 425 | ····sun4*:SunOS:*:*) |
| 426 | » case·`/usr/bin/arch·-k`·in |
| 427 | » ····Series*|S4*) |
| 428 | » » UNAME_RELEASE=`uname·-v` |
| 429 | » » ;; |
| 430 | » esac |
| 431 | » #·Japanese·Language·versions·have·a·version·number·like·`4.1.3-JL'. |
| 432 | » SUN_REL=`echo·"$UNAME_RELEASE"·|·sed·-e·'s/-/_/'` |
| 433 | » GUESS=sparc-sun-sunos$SUN_REL |
| 434 | » ;; |
| 435 | ····sun3*:SunOS:*:*) |
| 436 | » GUESS=m68k-sun-sunos$UNAME_RELEASE |
| 437 | » ;; |
| 438 | ····sun*:*:4.2BSD:*) |
| 439 | » UNAME_RELEASE=`(sed·1q·/etc/motd·|·awk·'{print·substr($5,1,3)}')·2>/dev/null` |
| 440 | » test·"x$UNAME_RELEASE"·=·x·&&·UNAME_RELEASE=3 |
| 441 | » case·`/bin/arch`·in |
| 442 | » ····sun3) |
| 443 | » » GUESS=m68k-sun-sunos$UNAME_RELEASE |
| 444 | » » ;; |
| 445 | » ····sun4) |
| 446 | » » GUESS=sparc-sun-sunos$UNAME_RELEASE |
| 447 | » » ;; |
| 448 | » esac |
| 449 | » ;; |
| 450 | ····aushp:SunOS:*:*) |
| 451 | » GUESS=sparc-auspex-sunos$UNAME_RELEASE |
| 452 | » ;; |
| 453 | ····#·The·situation·for·MiNT·is·a·little·confusing.··The·machine·name |
| 454 | ····#·can·be·virtually·everything·(everything·which·is·not |
| 455 | ····#·"atarist"·or·"atariste"·at·least·should·have·a·processor |
| 456 | ····#·>·m68000).··The·system·name·ranges·from·"MiNT"·over·"FreeMiNT" |
| 457 | ····#·to·the·lowercase·version·"mint"·(or·"freemint").··Finally |
| 458 | ····#·the·system·name·"TOS"·denotes·a·system·which·is·actually·not |
| 459 | ····#·MiNT.··But·MiNT·is·downward·compatible·to·TOS,·so·this·should |
| 460 | ····#·be·no·problem. |
| 461 | ····atarist[e]:*MiNT:*:*·|·atarist[e]:*mint:*:*·|·atarist[e]:*TOS:*:*) |
| 462 | » GUESS=m68k-atari-mint$UNAME_RELEASE |
| 463 | » ;; |
| 464 | ····atari*:*MiNT:*:*·|·atari*:*mint:*:*·|·atarist[e]:*TOS:*:*) |
| 465 | » GUESS=m68k-atari-mint$UNAME_RELEASE |
| 466 | » ;; |
| 467 | ····*falcon*:*MiNT:*:*·|·*falcon*:*mint:*:*·|·*falcon*:*TOS:*:*) |
| 468 | » GUESS=m68k-atari-mint$UNAME_RELEASE |
| 469 | » ;; |
| 470 | ····milan*:*MiNT:*:*·|·milan*:*mint:*:*·|·*milan*:*TOS:*:*) |
| 471 | » GUESS=m68k-milan-mint$UNAME_RELEASE |
| 472 | » ;; |
| 473 | ····hades*:*MiNT:*:*·|·hades*:*mint:*:*·|·*hades*:*TOS:*:*) |
| 474 | » GUESS=m68k-hades-mint$UNAME_RELEASE |
| 475 | » ;; |
| 476 | ····*:*MiNT:*:*·|·*:*mint:*:*·|·*:*TOS:*:*) |
| 477 | » GUESS=m68k-unknown-mint$UNAME_RELEASE |
| 478 | » ;; |
| 479 | ····m68k:machten:*:*) |
| 480 | » GUESS=m68k-apple-machten$UNAME_RELEASE |
| 481 | » ;; |
| 482 | ····powerpc:machten:*:*) |
| 483 | » GUESS=powerpc-apple-machten$UNAME_RELEASE |
| 484 | » ;; |
| 485 | ····RISC*:Mach:*:*) |
| 486 | » GUESS=mips-dec-mach_bsd4.3 |
| 487 | » ;; |
| 488 | ····RISC*:ULTRIX:*:*) |
| 489 | » GUESS=mips-dec-ultrix$UNAME_RELEASE |
| 490 | » ;; |
| 491 | ····VAX*:ULTRIX*:*:*) |
| 492 | » GUESS=vax-dec-ultrix$UNAME_RELEASE |
| 493 | » ;; |
| 494 | ····2020:CLIX:*:*·|·2430:CLIX:*:*) |
| 495 | » GUESS=clipper-intergraph-clix$UNAME_RELEASE |
| 496 | » ;; |
| 497 | ····mips:*:*:UMIPS·|·mips:*:*:RISCos) |
| 498 | » set_cc_for_build |
| 499 | » sed·'s/^»//'·<<·EOF·>·"$dummy.c" |
| 500 | #ifdef·__cplusplus |
| 501 | #include·<stdio.h>··/*·for·printf()·prototype·*/ |
| 502 | » int·main·(int·argc,·char·*argv[])·{ |
| 503 | #else |
| 504 | » int·main·(argc,·argv)·int·argc;·char·*argv[];·{ |
| 505 | #endif |
| 506 | » #if·defined·(host_mips)·&&·defined·(MIPSEB) |
| 507 | » #if·defined·(SYSTYPE_SYSV) |
| 508 | » ··printf·("mips-mips-riscos%ssysv\\n",·argv[1]);·exit·(0); |
| 509 | » #endif |
| 510 | » #if·defined·(SYSTYPE_SVR4) |
| 511 | » ··printf·("mips-mips-riscos%ssvr4\\n",·argv[1]);·exit·(0); |
| 512 | » #endif |
| 513 | » #if·defined·(SYSTYPE_BSD43)·||·defined(SYSTYPE_BSD) |
| 514 | » ··printf·("mips-mips-riscos%sbsd\\n",·argv[1]);·exit·(0); |
| 515 | » #endif |
| 516 | » #endif |
| 517 | » ··exit·(-1); |
| 518 | » } |
| 519 | EOF |
| 520 | » $CC_FOR_BUILD·-o·"$dummy"·"$dummy.c"·&& |
| 521 | » ··dummyarg=`echo·"$UNAME_RELEASE"·|·sed·-n·'s/\([0-9]*\).*/\1/p'`·&& |
| 522 | » ··SYSTEM_NAME=`"$dummy"·"$dummyarg"`·&& |
| 523 | » ····{·echo·"$SYSTEM_NAME";·exit;·} |
| 524 | » GUESS=mips-mips-riscos$UNAME_RELEASE |
| 525 | » ;; |
| 526 | ····Motorola:PowerMAX_OS:*:*) |
| 527 | » GUESS=powerpc-motorola-powermax |
| 528 | » ;; |
| 529 | ····Motorola:*:4.3:PL8-*) |
| 530 | » GUESS=powerpc-harris-powermax |
| 531 | » ;; |
| 532 | ····Night_Hawk:*:*:PowerMAX_OS·|·Synergy:PowerMAX_OS:*:*) |
| 533 | » GUESS=powerpc-harris-powermax |
| 534 | » ;; |
| 535 | ····Night_Hawk:Power_UNIX:*:*) |
| 536 | » GUESS=powerpc-harris-powerunix |
| 537 | » ;; |
| 538 | ····m88k:CX/UX:7*:*) |
| 539 | » GUESS=m88k-harris-cxux7 |
| 540 | » ;; |
| 541 | ····m88k:*:4*:R4*) |
| 542 | » GUESS=m88k-motorola-sysv4 |
| 543 | » ;; |
| 544 | ····m88k:*:3*:R3*) |
| 545 | » GUESS=m88k-motorola-sysv3 |
| 546 | » ;; |
| 547 | ····AViiON:dgux:*:*) |
| 548 | » #·DG/UX·returns·AViiON·for·all·architectures |
| 549 | » UNAME_PROCESSOR=`/usr/bin/uname·-p` |
| 550 | » if·test·"$UNAME_PROCESSOR"·=·mc88100·||·test·"$UNAME_PROCESSOR"·=·mc88110 |
| 551 | » then |
| 552 | » ····if·test·"$TARGET_BINARY_INTERFACE"x·=·m88kdguxelfx·||·\ |
| 553 | » ·······test·"$TARGET_BINARY_INTERFACE"x·=·x |
| 554 | » ····then |
| 555 | » » GUESS=m88k-dg-dgux$UNAME_RELEASE |
| 556 | » ····else |
| 557 | » » GUESS=m88k-dg-dguxbcs$UNAME_RELEASE |
| 558 | » ····fi |
| 559 | » else |
| 560 | » ····GUESS=i586-dg-dgux$UNAME_RELEASE |
| 561 | » fi |
| 562 | » ;; |
| 563 | ····M88*:DolphinOS:*:*)» #·DolphinOS·(SVR3) |
| 564 | » GUESS=m88k-dolphin-sysv3 |
| 565 | » ;; |
| 566 | ····M88*:*:R3*:*) |
| 567 | » #·Delta·88k·system·running·SVR3 |
| 568 | » GUESS=m88k-motorola-sysv3 |
| 569 | » ;; |
| 570 | ····XD88*:*:*:*)·#·Tektronix·XD88·system·running·UTekV·(SVR3) |
| 571 | » GUESS=m88k-tektronix-sysv3 |
| 572 | » ;; |
| 573 | ····Tek43[0-9][0-9]:UTek:*:*)·#·Tektronix·4300·system·running·UTek·(BSD) |
| 574 | » GUESS=m68k-tektronix-bsd |
| 575 | » ;; |
| 576 | ····*:IRIX*:*:*) |
| 577 | » IRIX_REL=`echo·"$UNAME_RELEASE"·|·sed·-e·'s/-/_/g'` |
| 578 | » GUESS=mips-sgi-irix$IRIX_REL |
| 579 | » ;; |
| 580 | ····????????:AIX?:[12].1:2)···#·AIX·2.2.1·or·AIX·2.1.1·is·RT/PC·AIX. |
| 581 | » GUESS=romp-ibm-aix····#·uname·-m·gives·an·8·hex-code·CPU·id |
| 582 | » ;;····················#·Note·that:·echo·"'`uname·-s`'"·gives·'AIX·' |
| 583 | ····i*86:AIX:*:*) |
| 584 | » GUESS=i386-ibm-aix |
| 585 | » ;; |
| 586 | ····ia64:AIX:*:*) |
| 587 | » if·test·-x·/usr/bin/oslevel·;·then |
| 588 | » » IBM_REV=`/usr/bin/oslevel` |
| 589 | » else |
| 590 | » » IBM_REV=$UNAME_VERSION.$UNAME_RELEASE |
| 591 | » fi |
| 592 | » GUESS=$UNAME_MACHINE-ibm-aix$IBM_REV |
| 593 | » ;; |
| 594 | ····*:AIX:2:3) |
| 595 | » if·grep·bos325·/usr/include/stdio.h·>/dev/null·2>&1;·then |
| 596 | » » set_cc_for_build |
| 597 | » » sed·'s/^»»//'·<<·EOF·>·"$dummy.c" |
| 598 | » » #include·<sys/systemcfg.h> |
| |
| 599 | » » main() |
| 600 | » » » { |
| 601 | » » » if·(!__power_pc()) |
| 602 | » » » » exit(1); |
| 603 | » » » puts("powerpc-ibm-aix3.2.5"); |
| 604 | » » » exit(0); |
| 605 | » » » } |
| 606 | EOF |
| 607 | » » if·$CC_FOR_BUILD·-o·"$dummy"·"$dummy.c"·&&·SYSTEM_NAME=`"$dummy"` |
| 608 | » » then |
| 609 | » » » GUESS=$SYSTEM_NAME |
| 610 | » » else |
| 611 | » » » GUESS=rs6000-ibm-aix3.2.5 |
| 612 | » » fi |
| 613 | » elif·grep·bos324·/usr/include/stdio.h·>/dev/null·2>&1;·then |
| 614 | » » GUESS=rs6000-ibm-aix3.2.4 |
| 615 | » else |
| 616 | » » GUESS=rs6000-ibm-aix3.2 |
| 617 | » fi |
| 618 | » ;; |
| 619 | ····*:AIX:*:[4567]) |
| 620 | » IBM_CPU_ID=`/usr/sbin/lsdev·-C·-c·processor·-S·available·|·sed·1q·|·awk·'{·print·$1·}'` |
| 621 | » if·/usr/sbin/lsattr·-El·"$IBM_CPU_ID"·|·grep·'·POWER'·>/dev/null·2>&1;·then |
| 622 | » » IBM_ARCH=rs6000 |
| 623 | » else |
| 624 | » » IBM_ARCH=powerpc |
| 625 | » fi |
| 626 | » if·test·-x·/usr/bin/lslpp·;·then |
| 627 | » » IBM_REV=`/usr/bin/lslpp·-Lqc·bos.rte.libc·|·\ |
| 628 | » » » ···awk·-F:·'{·print·$3·}'·|·sed·s/[0-9]*$/0/` |
| 629 | » else |
| 630 | » » IBM_REV=$UNAME_VERSION.$UNAME_RELEASE |
| 631 | » fi |
| 632 | » GUESS=$IBM_ARCH-ibm-aix$IBM_REV |
| 633 | » ;; |
| 634 | ····*:AIX:*:*) |
| 635 | » GUESS=rs6000-ibm-aix |
| 636 | » ;; |
| 637 | ····ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) |
| 638 | » GUESS=romp-ibm-bsd4.4 |
| 639 | » ;; |
| 640 | ····ibmrt:*BSD:*|romp-ibm:BSD:*)············#·covers·RT/PC·BSD·and |
| 641 | » GUESS=romp-ibm-bsd$UNAME_RELEASE····#·4.3·with·uname·added·to |
| 642 | » ;;··································#·report:·romp-ibm·BSD·4.3 |
| 643 | ····*:BOSX:*:*) |
| 644 | » GUESS=rs6000-bull-bosx |
| 645 | » ;; |
| 646 | ····DPX/2?00:B.O.S.:*:*) |
| 647 | » GUESS=m68k-bull-sysv3 |
| 648 | » ;; |
| 649 | ····9000/[34]??:4.3bsd:1.*:*) |
| 650 | » GUESS=m68k-hp-bsd |
| 651 | » ;; |
| 652 | ····hp300:4.4BSD:*:*·|·9000/[34]??:4.3bsd:2.*:*) |
| 653 | » GUESS=m68k-hp-bsd4.4 |
| 654 | » ;; |
| 655 | ····9000/[34678]??:HP-UX:*:*) |
| 656 | » HPUX_REV=`echo·"$UNAME_RELEASE"·|·sed·-e·'s/[^.]*.[0B]*//'` |
| 657 | » case·$UNAME_MACHINE·in |
| 658 | » ····9000/31?)············HP_ARCH=m68000·;; |
| 659 | » ····9000/[34]??)·········HP_ARCH=m68k·;; |
| 660 | » ····9000/[678][0-9][0-9]) |
| 661 | » » if·test·-x·/usr/bin/getconf;·then |
| 662 | » » ····sc_cpu_version=`/usr/bin/getconf·SC_CPU_VERSION·2>/dev/null` |
| 663 | » » ····sc_kernel_bits=`/usr/bin/getconf·SC_KERNEL_BITS·2>/dev/null` |
| 664 | » » ····case·$sc_cpu_version·in |
| 665 | » » ······523)·HP_ARCH=hppa1.0·;;·#·CPU_PA_RISC1_0 |
| 666 | » » ······528)·HP_ARCH=hppa1.1·;;·#·CPU_PA_RISC1_1 |
| 667 | » » ······532)······················#·CPU_PA_RISC2_0 |
| 668 | » » » case·$sc_kernel_bits·in |
| 669 | » » » ··32)·HP_ARCH=hppa2.0n·;; |
| 670 | » » » ··64)·HP_ARCH=hppa2.0w·;; |
| 671 | » » » ··'')·HP_ARCH=hppa2.0·;;···#·HP-UX·10.20 |
| 672 | » » » esac·;; |
| 673 | » » ····esac |
| 674 | » » fi |
| 675 | » » if·test·"$HP_ARCH"·=·"";·then |
| 676 | » » ····set_cc_for_build |
| 677 | » » ····sed·'s/^»»//'·<<·EOF·>·"$dummy.c" |
| |
| 678 | » » #define·_HPUX_SOURCE |
| 679 | » » #include·<stdlib.h> |
| 680 | » » #include·<unistd.h> |
| |
| 681 | » » int·main·() |
| 682 | » » { |
| 683 | » » #if·defined(_SC_KERNEL_BITS) |
| 684 | » » ····long·bits·=·sysconf(_SC_KERNEL_BITS); |
| 685 | » » #endif |
| 686 | » » ····long·cpu··=·sysconf·(_SC_CPU_VERSION); |
| |
| 687 | » » ····switch·(cpu) |
| 688 | » » » { |
| 689 | » » » case·CPU_PA_RISC1_0:·puts·("hppa1.0");·break; |
| 690 | » » » case·CPU_PA_RISC1_1:·puts·("hppa1.1");·break; |
| 691 | » » » case·CPU_PA_RISC2_0: |
| 692 | » » #if·defined(_SC_KERNEL_BITS) |
| 693 | » » » ····switch·(bits) |
| 694 | » » » » { |
| 695 | » » » » case·64:·puts·("hppa2.0w");·break; |
| 696 | » » » » case·32:·puts·("hppa2.0n");·break; |
| 697 | » » » » default:·puts·("hppa2.0");·break; |
| 698 | » » » » }·break; |
| 699 | » » #else··/*·!defined(_SC_KERNEL_BITS)·*/ |
| 700 | » » » ····puts·("hppa2.0");·break; |
| 701 | » » #endif |
| 702 | » » » default:·puts·("hppa1.0");·break; |
| 703 | » » » } |
| 704 | » » ····exit·(0); |
| 705 | » » } |
| 706 | EOF |
| 707 | » » ····(CCOPTS=""·$CC_FOR_BUILD·-o·"$dummy"·"$dummy.c"·2>/dev/null)·&&·HP_ARCH=`"$dummy"` |
| 708 | » » ····test·-z·"$HP_ARCH"·&&·HP_ARCH=hppa |
| 709 | » » fi·;; |
| 710 | » esac |
| 711 | » if·test·"$HP_ARCH"·=·hppa2.0w |
| 712 | » then |
| 713 | » ····set_cc_for_build |
| |
| 714 | » ····#·hppa2.0w-hp-hpux*·has·a·64-bit·kernel·and·a·compiler·generating |
| 715 | » ····#·32-bit·code.··hppa64-hp-hpux*·has·the·same·kernel·and·a·compiler |
| 716 | » ····#·generating·64-bit·code.··GNU·and·HP·use·different·nomenclature: |
| 717 | » ····# |
| 718 | » ····#·$·CC_FOR_BUILD=cc·./config.guess |
| 719 | » ····#·=>·hppa2.0w-hp-hpux11.23 |
| 720 | » ····#·$·CC_FOR_BUILD="cc·+DA2.0w"·./config.guess |
| 721 | » ····#·=>·hppa64-hp-hpux11.23 |
| |
| 722 | » ····if·echo·__LP64__·|·(CCOPTS=""·$CC_FOR_BUILD·-E·-·2>/dev/null)·| |
| 723 | » » grep·-q·__LP64__ |
| 724 | » ····then |
| 725 | » » HP_ARCH=hppa2.0w |
| 726 | » ····else |
| 727 | » » HP_ARCH=hppa64 |
| 728 | » ····fi |
| 729 | » fi |
| 730 | » GUESS=$HP_ARCH-hp-hpux$HPUX_REV |
| 731 | » ;; |
| 732 | ····ia64:HP-UX:*:*) |
| 733 | » HPUX_REV=`echo·"$UNAME_RELEASE"·|·sed·-e·'s/[^.]*.[0B]*//'` |
| 734 | » GUESS=ia64-hp-hpux$HPUX_REV |
| 735 | » ;; |
| 736 | ····3050*:HI-UX:*:*) |
| 737 | » set_cc_for_build |
| 738 | » sed·'s/^»//'·<<·EOF·>·"$dummy.c" |
| 739 | » #include·<unistd.h> |
| 740 | » int |
| 741 | » main·() |
| 742 | » { |
| 743 | » ··long·cpu·=·sysconf·(_SC_CPU_VERSION); |
| 744 | » ··/*·The·order·matters,·because·CPU_IS_HP_MC68K·erroneously·returns |
| 745 | » ·····true·for·CPU_PA_RISC1_0.··CPU_IS_PA_RISC·returns·correct |
| 746 | » ·····results,·however.··*/ |
| 747 | » ··if·(CPU_IS_PA_RISC·(cpu)) |
| 748 | » ····{ |
| 749 | » ······switch·(cpu) |
| 750 | » » { |
| 751 | » » ··case·CPU_PA_RISC1_0:·puts·("hppa1.0-hitachi-hiuxwe2");·break; |
| 752 | » » ··case·CPU_PA_RISC1_1:·puts·("hppa1.1-hitachi-hiuxwe2");·break; |
| 753 | » » ··case·CPU_PA_RISC2_0:·puts·("hppa2.0-hitachi-hiuxwe2");·break; |
| 754 | » » ··default:·puts·("hppa-hitachi-hiuxwe2");·break; |
| 755 | » » } |
| 756 | » ····} |
| 757 | » ··else·if·(CPU_IS_HP_MC68K·(cpu)) |
| 758 | » ····puts·("m68k-hitachi-hiuxwe2"); |
| 759 | » ··else·puts·("unknown-hitachi-hiuxwe2"); |
| 760 | » ··exit·(0); |
| 761 | » } |
| 762 | EOF |
| 763 | » $CC_FOR_BUILD·-o·"$dummy"·"$dummy.c"·&&·SYSTEM_NAME=`"$dummy"`·&& |
| 764 | » » {·echo·"$SYSTEM_NAME";·exit;·} |
| 765 | » GUESS=unknown-hitachi-hiuxwe2 |
| 766 | » ;; |
| 767 | ····9000/7??:4.3bsd:*:*·|·9000/8?[79]:4.3bsd:*:*) |
| 768 | » GUESS=hppa1.1-hp-bsd |
| 769 | » ;; |
| 770 | ····9000/8??:4.3bsd:*:*) |
| 771 | » GUESS=hppa1.0-hp-bsd |
| 772 | » ;; |
| 773 | ····*9??*:MPE/iX:*:*·|·*3000*:MPE/iX:*:*) |
| 774 | » GUESS=hppa1.0-hp-mpeix |
| 775 | » ;; |
| 776 | ····hp7??:OSF1:*:*·|·hp8?[79]:OSF1:*:*) |
| 777 | » GUESS=hppa1.1-hp-osf |
| 778 | » ;; |
| 779 | ····hp8??:OSF1:*:*) |
| 780 | » GUESS=hppa1.0-hp-osf |
| 781 | » ;; |
| 782 | ····i*86:OSF1:*:*) |
| 783 | » if·test·-x·/usr/sbin/sysversion·;·then |
| 784 | » ····GUESS=$UNAME_MACHINE-unknown-osf1mk |
| 785 | » else |
| 786 | » ····GUESS=$UNAME_MACHINE-unknown-osf1 |
| 787 | » fi |
| 788 | » ;; |
| 789 | ····parisc*:Lites*:*:*) |
| 790 | » GUESS=hppa1.1-hp-lites |
| 791 | » ;; |
| 792 | ····C1*:ConvexOS:*:*·|·convex:ConvexOS:C1*:*) |
| 793 | » GUESS=c1-convex-bsd |
| 794 | » ;; |
| 795 | ····C2*:ConvexOS:*:*·|·convex:ConvexOS:C2*:*) |
| 796 | » if·getsysinfo·-f·scalar_acc |
| 797 | » then·echo·c32-convex-bsd |
| 798 | » else·echo·c2-convex-bsd |
| 799 | » fi |
| 800 | » exit·;; |
| 801 | ····C34*:ConvexOS:*:*·|·convex:ConvexOS:C34*:*) |
| 802 | » GUESS=c34-convex-bsd |
| 803 | » ;; |
| 804 | ····C38*:ConvexOS:*:*·|·convex:ConvexOS:C38*:*) |
| 805 | » GUESS=c38-convex-bsd |
| 806 | » ;; |
| 807 | ····C4*:ConvexOS:*:*·|·convex:ConvexOS:C4*:*) |
| 808 | » GUESS=c4-convex-bsd |
| 809 | » ;; |
| 810 | ····CRAY*Y-MP:*:*:*) |
| 811 | » CRAY_REL=`echo·"$UNAME_RELEASE"·|·sed·-e·'s/\.[^.]*$/.X/'` |
| 812 | » GUESS=ymp-cray-unicos$CRAY_REL |
| 813 | » ;; |
| 814 | ····CRAY*[A-Z]90:*:*:*) |
| 815 | » echo·"$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE"·\ |
| 816 | » |·sed·-e·'s/CRAY.*\([A-Z]90\)/\1/'·\ |
| 817 | » ······-e·y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/·\ |
| 818 | » ······-e·'s/\.[^.]*$/.X/' |
| 819 | » exit·;; |
| 820 | ····CRAY*TS:*:*:*) |
| 821 | » CRAY_REL=`echo·"$UNAME_RELEASE"·|·sed·-e·'s/\.[^.]*$/.X/'` |
| 822 | » GUESS=t90-cray-unicos$CRAY_REL |
| 823 | » ;; |
| 824 | ····CRAY*T3E:*:*:*) |
| 825 | » CRAY_REL=`echo·"$UNAME_RELEASE"·|·sed·-e·'s/\.[^.]*$/.X/'` |
| 826 | » GUESS=alphaev5-cray-unicosmk$CRAY_REL |
| 827 | » ;; |
| 828 | ····CRAY*SV1:*:*:*) |
| 829 | » CRAY_REL=`echo·"$UNAME_RELEASE"·|·sed·-e·'s/\.[^.]*$/.X/'` |
| 830 | » GUESS=sv1-cray-unicos$CRAY_REL |
| 831 | » ;; |
| 832 | ····*:UNICOS/mp:*:*) |
| 833 | » CRAY_REL=`echo·"$UNAME_RELEASE"·|·sed·-e·'s/\.[^.]*$/.X/'` |
| 834 | » GUESS=craynv-cray-unicosmp$CRAY_REL |
| 835 | » ;; |
| 836 | ····F30[01]:UNIX_System_V:*:*·|·F700:UNIX_System_V:*:*) |
| 837 | » FUJITSU_PROC=`uname·-m·|·tr·ABCDEFGHIJKLMNOPQRSTUVWXYZ·abcdefghijklmnopqrstuvwxyz` |
| 838 | » FUJITSU_SYS=`uname·-p·|·tr·ABCDEFGHIJKLMNOPQRSTUVWXYZ·abcdefghijklmnopqrstuvwxyz·|·sed·-e·'s/\///'` |
| 839 | » FUJITSU_REL=`echo·"$UNAME_RELEASE"·|·sed·-e·'s/·/_/'` |
| 840 | » GUESS=${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} |
| 841 | » ;; |
| 842 | ····5000:UNIX_System_V:4.*:*) |
| 843 | » FUJITSU_SYS=`uname·-p·|·tr·ABCDEFGHIJKLMNOPQRSTUVWXYZ·abcdefghijklmnopqrstuvwxyz·|·sed·-e·'s/\///'` |
| 844 | » FUJITSU_REL=`echo·"$UNAME_RELEASE"·|·tr·ABCDEFGHIJKLMNOPQRSTUVWXYZ·abcdefghijklmnopqrstuvwxyz·|·sed·-e·'s/·/_/'` |
| 845 | » GUESS=sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL} |
| 846 | » ;; |
| 847 | ····i*86:BSD/386:*:*·|·i*86:BSD/OS:*:*·|·*:Ascend\·Embedded/OS:*:*) |
| 848 | » GUESS=$UNAME_MACHINE-pc-bsdi$UNAME_RELEASE |
| 849 | » ;; |
| 850 | ····sparc*:BSD/OS:*:*) |
| 851 | » GUESS=sparc-unknown-bsdi$UNAME_RELEASE |
| 852 | » ;; |
| 853 | ····*:BSD/OS:*:*) |
| 854 | » GUESS=$UNAME_MACHINE-unknown-bsdi$UNAME_RELEASE |
| 855 | » ;; |
| 856 | ····arm:FreeBSD:*:*) |
| 857 | » UNAME_PROCESSOR=`uname·-p` |
| 858 | » set_cc_for_build |
| 859 | » if·echo·__ARM_PCS_VFP·|·$CC_FOR_BUILD·-E·-·2>/dev/null·\ |
| 860 | » ····|·grep·-q·__ARM_PCS_VFP |
| 861 | » then |
| 862 | » ····FREEBSD_REL=`echo·"$UNAME_RELEASE"·|·sed·-e·'s/[-(].*//'` |
| 863 | » ····GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabi |
| 864 | » else |
| 865 | » ····FREEBSD_REL=`echo·"$UNAME_RELEASE"·|·sed·-e·'s/[-(].*//'` |
| 866 | » ····GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL-gnueabihf |
| 867 | » fi |
| 868 | » ;; |
| 869 | ····*:FreeBSD:*:*) |
| 870 | » UNAME_PROCESSOR=`/usr/bin/uname·-p` |
| 871 | » case·$UNAME_PROCESSOR·in |
| 872 | » ····amd64) |
| 873 | » » UNAME_PROCESSOR=x86_64·;; |
| 874 | » ····i386) |
| 875 | » » UNAME_PROCESSOR=i586·;; |
| 876 | » esac |
| 877 | » FREEBSD_REL=`echo·"$UNAME_RELEASE"·|·sed·-e·'s/[-(].*//'` |
| 878 | » GUESS=$UNAME_PROCESSOR-unknown-freebsd$FREEBSD_REL |
| 879 | » ;; |
| 880 | ····i*:CYGWIN*:*) |
| 881 | » GUESS=$UNAME_MACHINE-pc-cygwin |
| 882 | » ;; |
| 883 | ····*:MINGW64*:*) |
| 884 | » GUESS=$UNAME_MACHINE-pc-mingw64 |
| 885 | » ;; |
| 886 | ····*:MINGW*:*) |
| 887 | » GUESS=$UNAME_MACHINE-pc-mingw32 |
| 888 | » ;; |
| 889 | ····*:MSYS*:*) |
| 890 | » GUESS=$UNAME_MACHINE-pc-msys |
| 891 | » ;; |
| 892 | ····i*:PW*:*) |
| 893 | » GUESS=$UNAME_MACHINE-pc-pw32 |
| 894 | » ;; |
| 895 | ····*:SerenityOS:*:*) |
| 896 | ········GUESS=$UNAME_MACHINE-pc-serenity |
| 897 | ········;; |
| 898 | ····*:Interix*:*) |
| 899 | » case·$UNAME_MACHINE·in |
| 900 | » ····x86) |
| 901 | » » GUESS=i586-pc-interix$UNAME_RELEASE |
| 902 | » » ;; |
| 903 | » ····authenticamd·|·genuineintel·|·EM64T) |
| 904 | » » GUESS=x86_64-unknown-interix$UNAME_RELEASE |
| 905 | » » ;; |
| 906 | » ····IA64) |
| 907 | » » GUESS=ia64-unknown-interix$UNAME_RELEASE |
| 908 | » » ;; |
| 909 | » esac·;; |
| 910 | ····i*:UWIN*:*) |
| 911 | » GUESS=$UNAME_MACHINE-pc-uwin |
| 912 | » ;; |
| 913 | ····amd64:CYGWIN*:*:*·|·x86_64:CYGWIN*:*:*) |
| 914 | » GUESS=x86_64-pc-cygwin |
| 915 | » ;; |
| 916 | ····prep*:SunOS:5.*:*) |
| 917 | » SUN_REL=`echo·"$UNAME_RELEASE"·|·sed·-e·'s/[^.]*//'` |
| 918 | » GUESS=powerpcle-unknown-solaris2$SUN_REL |
| 919 | » ;; |
| 920 | ····*:GNU:*:*) |
| 921 | » #·the·GNU·system |
| 922 | » GNU_ARCH=`echo·"$UNAME_MACHINE"·|·sed·-e·'s,[-/].*$,,'` |
| 923 | » GNU_REL=`echo·"$UNAME_RELEASE"·|·sed·-e·'s,/.*$,,'` |
| 924 | » GUESS=$GNU_ARCH-unknown-$LIBC$GNU_REL |
| 925 | » ;; |
| 926 | ····*:GNU/*:*:*) |
| 927 | » #·other·systems·with·GNU·libc·and·userland |
| 928 | » GNU_SYS=`echo·"$UNAME_SYSTEM"·|·sed·'s,^[^/]*/,,'·|·tr·"[:upper:]"·"[:lower:]"` |
| 929 | » GNU_REL=`echo·"$UNAME_RELEASE"·|·sed·-e·'s/[-(].*//'` |
| 930 | » GUESS=$UNAME_MACHINE-unknown-$GNU_SYS$GNU_REL-$LIBC |
| 931 | » ;; |
| 932 | ····*:Minix:*:*) |
| 933 | » GUESS=$UNAME_MACHINE-unknown-minix |
| 934 | » ;; |
| 935 | ····aarch64:Linux:*:*) |
| 936 | » GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 937 | » ;; |
| 938 | ····aarch64_be:Linux:*:*) |
| 939 | » UNAME_MACHINE=aarch64_be |
| 940 | » GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 941 | » ;; |
| 942 | ····alpha:Linux:*:*) |
| 943 | » case·`sed·-n·'/^cpu·model/s/^.*:·\(.*\)/\1/p'·/proc/cpuinfo·2>/dev/null`·in |
| 944 | » ··EV5)···UNAME_MACHINE=alphaev5·;; |
| 945 | » ··EV56)··UNAME_MACHINE=alphaev56·;; |
| 946 | » ··PCA56)·UNAME_MACHINE=alphapca56·;; |
| 947 | » ··PCA57)·UNAME_MACHINE=alphapca56·;; |
| 948 | » ··EV6)···UNAME_MACHINE=alphaev6·;; |
| 949 | » ··EV67)··UNAME_MACHINE=alphaev67·;; |
| 950 | » ··EV68*)·UNAME_MACHINE=alphaev68·;; |
| 951 | » esac |
| 952 | » objdump·--private-headers·/bin/sh·|·grep·-q·ld.so.1 |
| 953 | » if·test·"$?"·=·0·;·then·LIBC=gnulibc1·;·fi |
| 954 | » GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 955 | » ;; |
| 956 | ····arc:Linux:*:*·|·arceb:Linux:*:*·|·arc32:Linux:*:*·|·arc64:Linux:*:*) |
| 957 | » GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 958 | » ;; |
| 959 | ····arm*:Linux:*:*) |
| 960 | » set_cc_for_build |
| 961 | » if·echo·__ARM_EABI__·|·$CC_FOR_BUILD·-E·-·2>/dev/null·\ |
| 962 | » ····|·grep·-q·__ARM_EABI__ |
| 963 | » then |
| 964 | » ····GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 965 | » else |
| 966 | » ····if·echo·__ARM_PCS_VFP·|·$CC_FOR_BUILD·-E·-·2>/dev/null·\ |
| 967 | » » |·grep·-q·__ARM_PCS_VFP |
| 968 | » ····then |
| 969 | » » GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabi |
| 970 | » ····else |
| 971 | » » GUESS=$UNAME_MACHINE-unknown-linux-${LIBC}eabihf |
| 972 | » ····fi |
| 973 | » fi |
| 974 | » ;; |
| 975 | ····avr32*:Linux:*:*) |
| 976 | » GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 977 | » ;; |
| 978 | ····cris:Linux:*:*) |
| 979 | » GUESS=$UNAME_MACHINE-axis-linux-$LIBC |
| 980 | » ;; |
| 981 | ····crisv32:Linux:*:*) |
| 982 | » GUESS=$UNAME_MACHINE-axis-linux-$LIBC |
| 983 | » ;; |
| 984 | ····e2k:Linux:*:*) |
| 985 | » GUESS=$UNAME_MACHINE-unknown-linux-$LIBC |
| 986 | » ;; |
Max diff block lines reached; -1/51255 bytes (-0.00%) of diff not shown.
|