Error Buddy
Do you have an error message from your application? Then find the answer with Error Buddy. You can search over 40000 source code files and troubleshooting documents using our beta lucene/nutch search interface or if you prefer, search as normal using google. With LXR technology you can drill right down into the line of source code where it came from with full cross-referencing.
If after searching you didn't get your ideal answer, or you are still unclear what the error means, you can choose to post that question to the community forums following the link included in the search results.
[1.6]001 #! /bin/sh 002 # Attempt to guess a canonical system name. 003 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 004 # 2000, 2001, 2002 Free Software Foundation, Inc. 005 006 timestamp='2002-03-20' 007 008 # This file is free software; you can redistribute it and/or modify it 009 # under the terms of the GNU General Public License as published by 010 # the Free Software Foundation; either version 2 of the License, or 011 # (at your option) any later version. 012 # 013 # This program is distributed in the hope that it will be useful, but 014 # WITHOUT ANY WARRANTY; without even the implied warranty of 015 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 016 # General Public License for more details. 017 # 018 # You should have received a copy of the GNU General Public License 019 # along with this program; if not, write to the Free Software 020 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 021 # 022 # As a special exception to the GNU General Public License, if you 023 # distribute this file as part of a program that contains a 024 # configuration script generated by Autoconf, you may include it under 025 # the same distribution terms that you use for the rest of that program. 026 027 # Originally written by Per Bothner <per@bothner.com>. 028 # Please send patches to <config-patches@gnu.org>. Submit a context 029 # diff and a properly formatted ChangeLog entry. 030 # 031 # This script attempts to guess a canonical system name similar to 032 # config.sub. If it succeeds, it prints the system name on stdout, and 033 # exits with 0. Otherwise, it exits with 1. 034 # 035 # The plan is that this can be called by configure scripts if you 036 # don't specify an explicit build system type. 037 038 me=`echo "$0" | sed -e 's,.*/,,'` 039 040 usage="\ 041 Usage: $0 [OPTION] 042 043 Output the configuration name of the system \`$me' is run on. 044 045 Operation modes: 046 -h, --help print this help, then exit 047 -t, --time-stamp print date of last modification, then exit 048 -v, --version print version number, then exit 049 050 Report bugs and patches to <config-patches@gnu.org>." 051 052 version="\ 053 GNU config.guess ($timestamp) 054 055 Originally written by Per Bothner. 056 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 057 Free Software Foundation, Inc. 058 059 This is free software; see the source for copying conditions. There is NO 060 warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." 061 062 help=" 063 Try \`$me --help' for more information." 064 065 # Parse command line 066 while test $# -gt 0 ; do 067 case $1 in 068 --time-stamp | --time* | -t ) 069 echo "$timestamp" ; exit 0 ;; 070 --version | -v ) 071 echo "$version" ; exit 0 ;; 072 --help | --h* | -h ) 073 echo "$usage"; exit 0 ;; 074 -- ) # Stop option processing 075 shift; break ;; 076 - ) # Use stdin as input. 077 break ;; 078 -* ) 079 echo "$me: invalid option $1$help" >&2 080 exit 1 ;; 081 * ) 082 break ;; 083 esac 084 done 085 086 if test $# != 0; then 087 echo "$me: too many arguments$help" >&2 088 exit 1 089 fi 090 091 092 dummy=dummy-$$ 093 trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 094 095 # CC_FOR_BUILD -- compiler used by this script. 096 # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 097 # use `HOST_CC' if defined, but it is deprecated. 098 099 set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in 100 ,,) echo "int dummy(){}" > $dummy.c ; 101 for c in cc gcc c89 c99 ; do 102 ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; 103 if test $? = 0 ; then 104 CC_FOR_BUILD="$c"; break ; 105 fi ; 106 done ; 107 rm -f $dummy.c $dummy.o $dummy.rel ; 108 if test x"$CC_FOR_BUILD" = x ; then 109 CC_FOR_BUILD=no_compiler_found ; 110 fi 111 ;; 112 ,,*) CC_FOR_BUILD=$CC ;; 113 ,*,*) CC_FOR_BUILD=$HOST_CC ;; 114 esac' 115 116 # This is needed to find uname on a Pyramid OSx when run in the BSD universe. 117 # (ghazi@noc.rutgers.edu 1994-08-24) 118 if (test -f /.attbin/uname) >/dev/null 2>&1 ; then 119 PATH=$PATH:/.attbin ; export PATH 120 fi 121 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 127 # Note: order is significant - the case branches are not exclusive. 128 129 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 130 *:NetBSD:*:*) 131 # NetBSD (nbsd) targets should (where applicable) match one or 132 # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, 133 # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently 134 # switched to ELF, *-*-netbsd* would select the old 135 # object file format. This provides both forward 136 # compatibility and a consistent mechanism for selecting the 137 # object file format. 138 # 139 # Note: NetBSD doesn't particularly care about the vendor 140 # portion of the name. We always set it to "unknown". 141 sysctl="sysctl -n hw.machine_arch" 142 UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 143 /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 144 case "${UNAME_MACHINE_ARCH}" in 145 arm*) machine=arm-unknown ;; 146 sh3el) machine=shl-unknown ;; 147 sh3eb) machine=sh-unknown ;; 148 *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 149 esac 150 # The Operating System including object format, if it has switched 151 # to ELF recently, or will in the future. 152 case "${UNAME_MACHINE_ARCH}" in 153 arm*|i386|m68k|ns32k|sh3*|sparc|vax) 154 eval $set_cc_for_build 155 if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 156 | grep __ELF__ >/dev/null 157 then 158 # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 159 # Return netbsd for either. FIX? 160 os=netbsd 161 else 162 os=netbsdelf 163 fi 164 ;; 165 *) 166 os=netbsd 167 ;; 168 esac 169 # The OS release 170 release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 171 # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 172 # contains redundant information, the shorter form: 173 # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 174 echo "${machine}-${os}${release}" 175 exit 0 ;; 176 amiga:OpenBSD:*:*) 177 echo m68k-unknown-openbsd${UNAME_RELEASE} 178 exit 0 ;; 179 arc:OpenBSD:*:*) 180 echo mipsel-unknown-openbsd${UNAME_RELEASE} 181 exit 0 ;; 182 hp300:OpenBSD:*:*) 183 echo m68k-unknown-openbsd${UNAME_RELEASE} 184 exit 0 ;; 185 mac68k:OpenBSD:*:*) 186 echo m68k-unknown-openbsd${UNAME_RELEASE} 187 exit 0 ;; 188 macppc:OpenBSD:*:*) 189 echo powerpc-unknown-openbsd${UNAME_RELEASE} 190 exit 0 ;; 191 mvme68k:OpenBSD:*:*) 192 echo m68k-unknown-openbsd${UNAME_RELEASE} 193 exit 0 ;; 194 mvme88k:OpenBSD:*:*) 195 echo m88k-unknown-openbsd${UNAME_RELEASE} 196 exit 0 ;; 197 mvmeppc:OpenBSD:*:*) 198 echo powerpc-unknown-openbsd${UNAME_RELEASE} 199 exit 0 ;; 200 pmax:OpenBSD:*:*) 201 echo mipsel-unknown-openbsd${UNAME_RELEASE} 202 exit 0 ;; 203 sgi:OpenBSD:*:*) 204 echo mipseb-unknown-openbsd${UNAME_RELEASE} 205 exit 0 ;; 206 sun3:OpenBSD:*:*) 207 echo m68k-unknown-openbsd${UNAME_RELEASE} 208 exit 0 ;; 209 wgrisc:OpenBSD:*:*) 210 echo mipsel-unknown-openbsd${UNAME_RELEASE} 211 exit 0 ;; 212 *:OpenBSD:*:*) 213 echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} 214 exit 0 ;; 215 alpha:OSF1:*:*) 216 if test $UNAME_RELEASE = "V4.0"; then 217 UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 218 fi 219 # A Vn.n version is a released version. 220 # A Tn.n version is a released field test version. 221 # A Xn.n version is an unreleased experimental baselevel. 222 # 1.2 uses "1.2" for uname -r. 223 cat <<EOF >$dummy.s 224 .data 225 \$Lformat: 226 .byte 37,100,45,37,120,10,0 # "%d-%x\n" 227 228 .text 229 .globl main 230 .align 4 231 .ent main 232 main: 233 .frame \$30,16,\$26,0 234 ldgp \$29,0(\$27) 235 .prologue 1 236 .long 0x47e03d80 # implver \$0 237 lda \$2,-1 238 .long 0x47e20c21 # amask \$2,\$1 239 lda \$16,\$Lformat 240 mov \$0,\$17 241 not \$1,\$18 242 jsr \$26,printf 243 ldgp \$29,0(\$26) 244 mov 0,\$16 245 jsr \$26,exit 246 .end main 247 EOF 248 eval $set_cc_for_build 249 $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null 250 if test "$?" = 0 ; then 251 case `./$dummy` in 252 0-0) 253 UNAME_MACHINE="alpha" 254 ;; 255 1-0) 256 UNAME_MACHINE="alphaev5" 257 ;; 258 1-1) 259 UNAME_MACHINE="alphaev56" 260 ;; 261 1-101) 262 UNAME_MACHINE="alphapca56" 263 ;; 264 2-303) 265 UNAME_MACHINE="alphaev6" 266 ;; 267 2-307) 268 UNAME_MACHINE="alphaev67" 269 ;; 270 2-1307) 271 UNAME_MACHINE="alphaev68" 272 ;; 273 esac 274 fi 275 rm -f $dummy.s $dummy 276 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 277 exit 0 ;; 278 Alpha\ *:Windows_NT*:*) 279 # How do we know it's Interix rather than the generic POSIX subsystem? 280 # Should we change UNAME_MACHINE based on the output of uname instead 281 # of the specific Alpha model? 282 echo alpha-pc-interix 283 exit 0 ;; 284 21064:Windows_NT:50:3) 285 echo alpha-dec-winnt3.5 286 exit 0 ;; 287 Amiga*:UNIX_System_V:4.0:*) 288 echo m68k-unknown-sysv4 289 exit 0;; 290 *:[Aa]miga[Oo][Ss]:*:*) 291 echo ${UNAME_MACHINE}-unknown-amigaos 292 exit 0 ;; 293 *:[Mm]orph[Oo][Ss]:*:*) 294 echo ${UNAME_MACHINE}-unknown-morphos 295 exit 0 ;; 296 *:OS/390:*:*) 297 echo i370-ibm-openedition 298 exit 0 ;; 299 arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 300 echo arm-acorn-riscix${UNAME_RELEASE} 301 exit 0;; 302 SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 303 echo hppa1.1-hitachi-hiuxmpp 304 exit 0;; 305 Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 306 # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 307 if test "`(/bin/universe) 2>/dev/null`" = att ; then 308 echo pyramid-pyramid-sysv3 309 else 310 echo pyramid-pyramid-bsd 311 fi 312 exit 0 ;; 313 NILE*:*:*:dcosx) 314 echo pyramid-pyramid-svr4 315 exit 0 ;; 316 sun4H:SunOS:5.*:*) 317 echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 318 exit 0 ;; 319 sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 320 echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 321 exit 0 ;; 322 i86pc:SunOS:5.*:*) 323 echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 324 exit 0 ;; 325 sun4*:SunOS:6*:*) 326 # According to config.sub, this is the proper way to canonicalize 327 # SunOS6. Hard to guess exactly what SunOS6 will be like, but 328 # it's likely to be more like Solaris than SunOS4. 329 echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 330 exit 0 ;; 331 sun4*:SunOS:*:*) 332 case "`/usr/bin/arch -k`" in 333 Series*|S4*) 334 UNAME_RELEASE=`uname -v` 335 ;; 336 esac 337 # Japanese Language versions have a version number like `4.1.3-JL'. 338 echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 339 exit 0 ;; 340 sun3*:SunOS:*:*) 341 echo m68k-sun-sunos${UNAME_RELEASE} 342 exit 0 ;; 343 sun*:*:4.2BSD:*) 344 UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 345 test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 346 case "`/bin/arch`" in 347 sun3) 348 echo m68k-sun-sunos${UNAME_RELEASE} 349 ;; 350 sun4) 351 echo sparc-sun-sunos${UNAME_RELEASE} 352 ;; 353 esac 354 exit 0 ;; 355 aushp:SunOS:*:*) 356 echo sparc-auspex-sunos${UNAME_RELEASE} 357 exit 0 ;; 358 # The situation for MiNT is a little confusing. The machine name 359 # can be virtually everything (everything which is not 360 # "atarist" or "atariste" at least should have a processor 361 # > m68000). The system name ranges from "MiNT" over "FreeMiNT" 362 # to the lowercase version "mint" (or "freemint"). Finally 363 # the system name "TOS" denotes a system which is actually not 364 # MiNT. But MiNT is downward compatible to TOS, so this should 365 # be no problem. 366 atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 367 echo m68k-atari-mint${UNAME_RELEASE} 368 exit 0 ;; 369 atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 370 echo m68k-atari-mint${UNAME_RELEASE} 371 exit 0 ;; 372 *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 373 echo m68k-atari-mint${UNAME_RELEASE} 374 exit 0 ;; 375 milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 376 echo m68k-milan-mint${UNAME_RELEASE} 377 exit 0 ;; 378 hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 379 echo m68k-hades-mint${UNAME_RELEASE} 380 exit 0 ;; 381 *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 382 echo m68k-unknown-mint${UNAME_RELEASE} 383 exit 0 ;; 384 powerpc:machten:*:*) 385 echo powerpc-apple-machten${UNAME_RELEASE} 386 exit 0 ;; 387 RISC*:Mach:*:*) 388 echo mips-dec-mach_bsd4.3 389 exit 0 ;; 390 RISC*:ULTRIX:*:*) 391 echo mips-dec-ultrix${UNAME_RELEASE} 392 exit 0 ;; 393 VAX*:ULTRIX*:*:*) 394 echo vax-dec-ultrix${UNAME_RELEASE} 395 exit 0 ;; 396 2020:CLIX:*:* | 2430:CLIX:*:*) 397 echo clipper-intergraph-clix${UNAME_RELEASE} 398 exit 0 ;; 399 mips:*:*:UMIPS | mips:*:*:RISCos) 400 eval $set_cc_for_build 401 sed 's/^ //' << EOF >$dummy.c 402 #ifdef __cplusplus 403 #include <stdio.h> /* for printf() prototype */ 404 int main (int argc, char *argv[]) { 405 #else 406 int main (argc, argv) int argc; char *argv[]; { 407 #endif 408 #if defined (host_mips) && defined (MIPSEB) 409 #if defined (SYSTYPE_SYSV) 410 printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); 411 #endif 412 #if defined (SYSTYPE_SVR4) 413 printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); 414 #endif 415 #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) 416 printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); 417 #endif 418 #endif 419 exit (-1); 420 } 421 EOF 422 $CC_FOR_BUILD $dummy.c -o $dummy \ 423 && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ 424 && rm -f $dummy.c $dummy && exit 0 425 rm -f $dummy.c $dummy 426 echo mips-mips-riscos${UNAME_RELEASE} 427 exit 0 ;; 428 Motorola:PowerMAX_OS:*:*) 429 echo powerpc-motorola-powermax 430 exit 0 ;; 431 Night_Hawk:Power_UNIX:*:*) 432 echo powerpc-harris-powerunix 433 exit 0 ;; 434 m88k:CX/UX:7*:*) 435 echo m88k-harris-cxux7 436 exit 0 ;; 437 m88k:*:4*:R4*) 438 echo m88k-motorola-sysv4 439 exit 0 ;; 440 m88k:*:3*:R3*) 441 echo m88k-motorola-sysv3 442 exit 0 ;; 443 AViiON:dgux:*:*) 444 # DG/UX returns AViiON for all architectures 445 UNAME_PROCESSOR=`/usr/bin/uname -p` 446 if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 447 then 448 if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ 449 [ ${TARGET_BINARY_INTERFACE}x = x ] 450 then 451 echo m88k-dg-dgux${UNAME_RELEASE} 452 else 453 echo m88k-dg-dguxbcs${UNAME_RELEASE} 454 fi 455 else 456 echo i586-dg-dgux${UNAME_RELEASE} 457 fi 458 exit 0 ;; 459 M88*:DolphinOS:*:*) # DolphinOS (SVR3) 460 echo m88k-dolphin-sysv3 461 exit 0 ;; 462 M88*:*:R3*:*) 463 # Delta 88k system running SVR3 464 echo m88k-motorola-sysv3 465 exit 0 ;; 466 XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 467 echo m88k-tektronix-sysv3 468 exit 0 ;; 469 Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 470 echo m68k-tektronix-bsd 471 exit 0 ;; 472 *:IRIX*:*:*) 473 echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 474 exit 0 ;; 475 ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 476 echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id 477 exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' 478 i*86:AIX:*:*) 479 echo i386-ibm-aix 480 exit 0 ;; 481 ia64:AIX:*:*) 482 if [ -x /usr/bin/oslevel ] ; then 483 IBM_REV=`/usr/bin/oslevel` 484 else 485 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 486 fi 487 echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 488 exit 0 ;; 489 *:AIX:2:3) 490 if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 491 eval $set_cc_for_build 492 sed 's/^ //' << EOF >$dummy.c 493 #include <sys/systemcfg.h> 494 495 main() 496 { 497 if (!__power_pc()) 498 exit(1); 499 puts("powerpc-ibm-aix3.2.5"); 500 exit(0); 501 } 502 EOF 503 $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 504 rm -f $dummy.c $dummy 505 echo rs6000-ibm-aix3.2.5 506 elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 507 echo rs6000-ibm-aix3.2.4 508 else 509 echo rs6000-ibm-aix3.2 510 fi 511 exit 0 ;; 512 *:AIX:*:[45]) 513 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 514 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 515 IBM_ARCH=rs6000 516 else 517 IBM_ARCH=powerpc 518 fi 519 if [ -x /usr/bin/oslevel ] ; then 520 IBM_REV=`/usr/bin/oslevel` 521 else 522 IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} 523 fi 524 echo ${IBM_ARCH}-ibm-aix${IBM_REV} 525 exit 0 ;; 526 *:AIX:*:*) 527 echo rs6000-ibm-aix 528 exit 0 ;; 529 ibmrt:4.4BSD:*|romp-ibm:BSD:*) 530 echo romp-ibm-bsd4.4 531 exit 0 ;; 532 ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and 533 echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to 534 exit 0 ;; # report: romp-ibm BSD 4.3 535 *:BOSX:*:*) 536 echo rs6000-bull-bosx 537 exit 0 ;; 538 DPX/2?00:B.O.S.:*:*) 539 echo m68k-bull-sysv3 540 exit 0 ;; 541 9000/[34]??:4.3bsd:1.*:*) 542 echo m68k-hp-bsd 543 exit 0 ;; 544 hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 545 echo m68k-hp-bsd4.4 546 exit 0 ;; 547 9000/[34678]??:HP-UX:*:*) 548 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 549 case "${UNAME_MACHINE}" in 550 9000/31? ) HP_ARCH=m68000 ;; 551 9000/[34]?? ) HP_ARCH=m68k ;; 552 9000/[678][0-9][0-9]) 553 if [ -x /usr/bin/getconf ]; then 554 sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 555 sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 556 case "${sc_cpu_version}" in 557 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 558 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 559 532) # CPU_PA_RISC2_0 560 case "${sc_kernel_bits}" in 561 32) HP_ARCH="hppa2.0n" ;; 562 64) HP_ARCH="hppa2.0w" ;; 563 '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 564 esac ;; 565 esac 566 fi 567 if [ "${HP_ARCH}" = "" ]; then 568 eval $set_cc_for_build 569 sed 's/^ //' << EOF >$dummy.c 570 571 #define _HPUX_SOURCE 572 #include <stdlib.h> 573 #include <unistd.h> 574 575 int main () 576 { 577 #if defined(_SC_KERNEL_BITS) 578 long bits = sysconf(_SC_KERNEL_BITS); 579 #endif 580 long cpu = sysconf (_SC_CPU_VERSION); 581 582 switch (cpu) 583 { 584 case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 585 case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 586 case CPU_PA_RISC2_0: 587 #if defined(_SC_KERNEL_BITS) 588 switch (bits) 589 { 590 case 64: puts ("hppa2.0w"); break; 591 case 32: puts ("hppa2.0n"); break; 592 default: puts ("hppa2.0"); break; 593 } break; 594 #else /* !defined(_SC_KERNEL_BITS) */ 595 puts ("hppa2.0"); break; 596 #endif 597 default: puts ("hppa1.0"); break; 598 } 599 exit (0); 600 } 601 EOF 602 (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy` 603 if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi 604 rm -f $dummy.c $dummy 605 fi ;; 606 esac 607 echo ${HP_ARCH}-hp-hpux${HPUX_REV} 608 exit 0 ;; 609 ia64:HP-UX:*:*) 610 HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 611 echo ia64-hp-hpux${HPUX_REV} 612 exit 0 ;; 613 3050*:HI-UX:*:*) 614 eval $set_cc_for_build 615 sed 's/^ //' << EOF >$dummy.c 616 #include <unistd.h> 617 int 618 main () 619 { 620 long cpu = sysconf (_SC_CPU_VERSION); 621 /* The order matters, because CPU_IS_HP_MC68K erroneously returns 622 true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct 623 results, however. */ 624 if (CPU_IS_PA_RISC (cpu)) 625 { 626 switch (cpu) 627 { 628 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; 629 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; 630 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; 631 default: puts ("hppa-hitachi-hiuxwe2"); break; 632 } 633 } 634 else if (CPU_IS_HP_MC68K (cpu)) 635 puts ("m68k-hitachi-hiuxwe2"); 636 else puts ("unknown-hitachi-hiuxwe2"); 637 exit (0); 638 } 639 EOF