Changeset 26773


Ignore:
Timestamp:
2013-01-21T23:38:47+13:00 (9 years ago)
Author:
davidb
Message:

New versions of config.guess and config.sub, needed so Android architecture recognized

Location:
main/trunk/greenstone2/common-src/packages/gdbm/gdbm-1.8.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/common-src/packages/gdbm/gdbm-1.8.3/config.guess

    r18019 r26773  
    22# Attempt to guess a canonical system name.
    33#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
    4 #   2000, 2001, 2002 Free Software Foundation, Inc.
    5 
    6 timestamp='2002-09-03'
     4#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
     5#   2011 Free Software Foundation, Inc.
     6
     7timestamp='2011-11-11'
    78
    89# This file is free software; you can redistribute it and/or modify it
     
    1819# You should have received a copy of the GNU General Public License
    1920# along with this program; if not, write to the Free Software
    20 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
     21# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
     22# 02110-1301, USA.
    2123#
    2224# As a special exception to the GNU General Public License, if you
     
    2527# the same distribution terms that you use for the rest of that program.
    2628
    27 # Originally written by Per Bothner <per@bothner.com>.
    28 # Please send patches to <config-patches@gnu.org>.  Submit a context
    29 # diff and a properly formatted ChangeLog entry.
     29
     30# Originally written by Per Bothner.  Please send patches (context
     31# diff format) to <config-patches@gnu.org> and include a ChangeLog
     32# entry.
    3033#
    3134# This script attempts to guess a canonical system name similar to
     
    3336# exits with 0.  Otherwise, it exits with 1.
    3437#
    35 # The plan is that this can be called by configure scripts if you
    36 # don't specify an explicit build system type.
     38# You can get the latest version of this script from:
     39# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
    3740
    3841me=`echo "$0" | sed -e 's,.*/,,'`
     
    5457
    5558Originally written by Per Bothner.
    56 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
    57 Free Software Foundation, Inc.
     59Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
     602001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
     61Software Foundation, Inc.
    5862
    5963This is free software; see the source for copying conditions.  There is NO
     
    6771  case $1 in
    6872    --time-stamp | --time* | -t )
    69        echo "$timestamp" ; exit 0 ;;
     73       echo "$timestamp" ; exit ;;
    7074    --version | -v )
    71        echo "$version" ; exit 0 ;;
     75       echo "$version" ; exit ;;
    7276    --help | --h* | -h )
    73        echo "$usage"; exit 0 ;;
     77       echo "$usage"; exit ;;
    7478    -- )     # Stop option processing
    7579       shift; break ;;
     
    99103# use `HOST_CC' if defined, but it is deprecated.
    100104
    101 # This shell variable is my proudest work .. or something. --bje
    102 
    103 set_cc_for_build='tmpdir=${TMPDIR-/tmp}/config-guess-$$ ;
    104 (old=`umask` && umask 077 && mkdir $tmpdir && umask $old && unset old)
    105    || (echo "$me: cannot create $tmpdir" >&2 && exit 1) ;
    106 dummy=$tmpdir/dummy ;
    107 files="$dummy.c $dummy.o $dummy.rel $dummy" ;
    108 trap '"'"'rm -f $files; rmdir $tmpdir; exit 1'"'"' 1 2 15 ;
     105# Portable tmp directory creation inspired by the Autoconf team.
     106
     107set_cc_for_build='
     108trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
     109trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
     110: ${TMPDIR=/tmp} ;
     111 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
     112 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
     113 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
     114 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
     115dummy=$tmp/dummy ;
     116tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
    109117case $CC_FOR_BUILD,$HOST_CC,$CC in
    110118 ,,)    echo "int x;" > $dummy.c ;
    111119    for c in cc gcc c89 c99 ; do
    112       if ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; then
     120      if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
    113121         CC_FOR_BUILD="$c"; break ;
    114122      fi ;
    115123    done ;
    116     rm -f $files ;
    117124    if test x"$CC_FOR_BUILD" = x ; then
    118125      CC_FOR_BUILD=no_compiler_found ;
     
    121128 ,,*)   CC_FOR_BUILD=$CC ;;
    122129 ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
    123 esac ;
    124 unset files'
     130esac ; set_cc_for_build= ;'
    125131
    126132# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
     
    157163        sh3el) machine=shl-unknown ;;
    158164        sh3eb) machine=sh-unknown ;;
     165        sh5el) machine=sh5le-unknown ;;
    159166        *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
    160167    esac
     
    165172        eval $set_cc_for_build
    166173        if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
    167             | grep __ELF__ >/dev/null
     174            | grep -q __ELF__
    168175        then
    169176            # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
     
    175182        ;;
    176183        *)
    177             os=netbsd
     184        os=netbsd
    178185        ;;
    179186    esac
    180187    # The OS release
    181     release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
     188    # Debian GNU/NetBSD machines have a different userland, and
     189    # thus, need a distinct triplet. However, they do not need
     190    # kernel version information, so it can be replaced with a
     191    # suitable tag, in the style of linux-gnu.
     192    case "${UNAME_VERSION}" in
     193        Debian*)
     194        release='-gnu'
     195        ;;
     196        *)
     197        release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
     198        ;;
     199    esac
    182200    # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
    183201    # contains redundant information, the shorter form:
    184202    # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
    185203    echo "${machine}-${os}${release}"
    186     exit 0 ;;
    187     amiga:OpenBSD:*:*)
    188     echo m68k-unknown-openbsd${UNAME_RELEASE}
    189     exit 0 ;;
    190     arc:OpenBSD:*:*)
    191     echo mipsel-unknown-openbsd${UNAME_RELEASE}
    192     exit 0 ;;
    193     hp300:OpenBSD:*:*)
    194     echo m68k-unknown-openbsd${UNAME_RELEASE}
    195     exit 0 ;;
    196     mac68k:OpenBSD:*:*)
    197     echo m68k-unknown-openbsd${UNAME_RELEASE}
    198     exit 0 ;;
    199     macppc:OpenBSD:*:*)
    200     echo powerpc-unknown-openbsd${UNAME_RELEASE}
    201     exit 0 ;;
    202     mvme68k:OpenBSD:*:*)
    203     echo m68k-unknown-openbsd${UNAME_RELEASE}
    204     exit 0 ;;
    205     mvme88k:OpenBSD:*:*)
    206     echo m88k-unknown-openbsd${UNAME_RELEASE}
    207     exit 0 ;;
    208     mvmeppc:OpenBSD:*:*)
    209     echo powerpc-unknown-openbsd${UNAME_RELEASE}
    210     exit 0 ;;
    211     pmax:OpenBSD:*:*)
    212     echo mipsel-unknown-openbsd${UNAME_RELEASE}
    213     exit 0 ;;
    214     sgi:OpenBSD:*:*)
    215     echo mipseb-unknown-openbsd${UNAME_RELEASE}
    216     exit 0 ;;
    217     sun3:OpenBSD:*:*)
    218     echo m68k-unknown-openbsd${UNAME_RELEASE}
    219     exit 0 ;;
    220     wgrisc:OpenBSD:*:*)
    221     echo mipsel-unknown-openbsd${UNAME_RELEASE}
    222     exit 0 ;;
     204    exit ;;
    223205    *:OpenBSD:*:*)
    224     echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
    225     exit 0 ;;
     206    UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
     207    echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
     208    exit ;;
     209    *:ekkoBSD:*:*)
     210    echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
     211    exit ;;
     212    *:SolidBSD:*:*)
     213    echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
     214    exit ;;
     215    macppc:MirBSD:*:*)
     216    echo powerpc-unknown-mirbsd${UNAME_RELEASE}
     217    exit ;;
     218    *:MirBSD:*:*)
     219    echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
     220    exit ;;
    226221    alpha:OSF1:*:*)
    227     if test $UNAME_RELEASE = "V4.0"; then
     222    case $UNAME_RELEASE in
     223    *4.0)
    228224        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
    229     fi
     225        ;;
     226    *5.*)
     227        UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
     228        ;;
     229    esac
     230    # According to Compaq, /usr/sbin/psrinfo has been available on
     231    # OSF/1 and Tru64 systems produced since 1995.  I hope that
     232    # covers most systems running today.  This code pipes the CPU
     233    # types through head -n 1, so we only detect the type of CPU 0.
     234    ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
     235    case "$ALPHA_CPU_TYPE" in
     236        "EV4 (21064)")
     237        UNAME_MACHINE="alpha" ;;
     238        "EV4.5 (21064)")
     239        UNAME_MACHINE="alpha" ;;
     240        "LCA4 (21066/21068)")
     241        UNAME_MACHINE="alpha" ;;
     242        "EV5 (21164)")
     243        UNAME_MACHINE="alphaev5" ;;
     244        "EV5.6 (21164A)")
     245        UNAME_MACHINE="alphaev56" ;;
     246        "EV5.6 (21164PC)")
     247        UNAME_MACHINE="alphapca56" ;;
     248        "EV5.7 (21164PC)")
     249        UNAME_MACHINE="alphapca57" ;;
     250        "EV6 (21264)")
     251        UNAME_MACHINE="alphaev6" ;;
     252        "EV6.7 (21264A)")
     253        UNAME_MACHINE="alphaev67" ;;
     254        "EV6.8CB (21264C)")
     255        UNAME_MACHINE="alphaev68" ;;
     256        "EV6.8AL (21264B)")
     257        UNAME_MACHINE="alphaev68" ;;
     258        "EV6.8CX (21264D)")
     259        UNAME_MACHINE="alphaev68" ;;
     260        "EV6.9A (21264/EV69A)")
     261        UNAME_MACHINE="alphaev69" ;;
     262        "EV7 (21364)")
     263        UNAME_MACHINE="alphaev7" ;;
     264        "EV7.9 (21364A)")
     265        UNAME_MACHINE="alphaev79" ;;
     266    esac
     267    # A Pn.n version is a patched version.
    230268    # A Vn.n version is a released version.
    231269    # A Tn.n version is a released field test version.
    232270    # A Xn.n version is an unreleased experimental baselevel.
    233271    # 1.2 uses "1.2" for uname -r.
    234     eval $set_cc_for_build
    235     cat <<EOF >$dummy.s
    236     .data
    237 \$Lformat:
    238     .byte 37,100,45,37,120,10,0 # "%d-%x\n"
    239 
    240     .text
    241     .globl main
    242     .align 4
    243     .ent main
    244 main:
    245     .frame \$30,16,\$26,0
    246     ldgp \$29,0(\$27)
    247     .prologue 1
    248     .long 0x47e03d80 # implver \$0
    249     lda \$2,-1
    250     .long 0x47e20c21 # amask \$2,\$1
    251     lda \$16,\$Lformat
    252     mov \$0,\$17
    253     not \$1,\$18
    254     jsr \$26,printf
    255     ldgp \$29,0(\$26)
    256     mov 0,\$16
    257     jsr \$26,exit
    258     .end main
    259 EOF
    260     $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
    261     if test "$?" = 0 ; then
    262         case `$dummy` in
    263             0-0)
    264                 UNAME_MACHINE="alpha"
    265                 ;;
    266             1-0)
    267                 UNAME_MACHINE="alphaev5"
    268                 ;;
    269             1-1)
    270                 UNAME_MACHINE="alphaev56"
    271                 ;;
    272             1-101)
    273                 UNAME_MACHINE="alphapca56"
    274                 ;;
    275             2-303)
    276                 UNAME_MACHINE="alphaev6"
    277                 ;;
    278             2-307)
    279                 UNAME_MACHINE="alphaev67"
    280                 ;;
    281             2-1307)
    282                 UNAME_MACHINE="alphaev68"
    283                 ;;
    284             3-1307)
    285                 UNAME_MACHINE="alphaev7"
    286                 ;;
    287         esac
    288     fi
    289     rm -f $dummy.s $dummy && rmdir $tmpdir
    290     echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
    291     exit 0 ;;
     272    echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
     273    # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
     274    exitcode=$?
     275    trap '' 0
     276    exit $exitcode ;;
    292277    Alpha\ *:Windows_NT*:*)
    293278    # How do we know it's Interix rather than the generic POSIX subsystem?
     
    295280    # of the specific Alpha model?
    296281    echo alpha-pc-interix
    297     exit 0 ;;
     282    exit ;;
    298283    21064:Windows_NT:50:3)
    299284    echo alpha-dec-winnt3.5
    300     exit 0 ;;
     285    exit ;;
    301286    Amiga*:UNIX_System_V:4.0:*)
    302287    echo m68k-unknown-sysv4
    303     exit 0;;
     288    exit ;;
    304289    *:[Aa]miga[Oo][Ss]:*:*)
    305290    echo ${UNAME_MACHINE}-unknown-amigaos
    306     exit 0 ;;
     291    exit ;;
    307292    *:[Mm]orph[Oo][Ss]:*:*)
    308293    echo ${UNAME_MACHINE}-unknown-morphos
    309     exit 0 ;;
     294    exit ;;
    310295    *:OS/390:*:*)
    311296    echo i370-ibm-openedition
    312     exit 0 ;;
     297    exit ;;
     298    *:z/VM:*:*)
     299    echo s390-ibm-zvmoe
     300    exit ;;
     301    *:OS400:*:*)
     302    echo powerpc-ibm-os400
     303    exit ;;
    313304    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
    314305    echo arm-acorn-riscix${UNAME_RELEASE}
    315     exit 0;;
     306    exit ;;
     307    arm:riscos:*:*|arm:RISCOS:*:*)
     308    echo arm-unknown-riscos
     309    exit ;;
    316310    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
    317311    echo hppa1.1-hitachi-hiuxmpp
    318     exit 0;;
     312    exit ;;
    319313    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
    320314    # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
     
    324318        echo pyramid-pyramid-bsd
    325319    fi
    326     exit 0 ;;
     320    exit ;;
    327321    NILE*:*:*:dcosx)
    328322    echo pyramid-pyramid-svr4
    329     exit 0 ;;
    330     DRS?6000:UNIX_SV:4.2*:7*)
     323    exit ;;
     324    DRS?6000:unix:4.0:6*)
     325    echo sparc-icl-nx6
     326    exit ;;
     327    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
    331328    case `/usr/bin/uname -p` in
    332         sparc) echo sparc-icl-nx7 && exit 0 ;;
     329        sparc) echo sparc-icl-nx7; exit ;;
    333330    esac ;;
     331    s390x:SunOS:*:*)
     332    echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
     333    exit ;;
    334334    sun4H:SunOS:5.*:*)
    335335    echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    336     exit 0 ;;
     336    exit ;;
    337337    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
    338338    echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    339     exit 0 ;;
    340     i86pc:SunOS:5.*:*)
    341     echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    342     exit 0 ;;
     339    exit ;;
     340    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
     341    echo i386-pc-auroraux${UNAME_RELEASE}
     342    exit ;;
     343    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
     344    eval $set_cc_for_build
     345    SUN_ARCH="i386"
     346    # If there is a compiler, see if it is configured for 64-bit objects.
     347    # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
     348    # This test works for both compilers.
     349    if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
     350        if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
     351        (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
     352        grep IS_64BIT_ARCH >/dev/null
     353        then
     354        SUN_ARCH="x86_64"
     355        fi
     356    fi
     357    echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
     358    exit ;;
    343359    sun4*:SunOS:6*:*)
    344360    # According to config.sub, this is the proper way to canonicalize
     
    346362    # it's likely to be more like Solaris than SunOS4.
    347363    echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    348     exit 0 ;;
     364    exit ;;
    349365    sun4*:SunOS:*:*)
    350366    case "`/usr/bin/arch -k`" in
     
    355371    # Japanese Language versions have a version number like `4.1.3-JL'.
    356372    echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
    357     exit 0 ;;
     373    exit ;;
    358374    sun3*:SunOS:*:*)
    359375    echo m68k-sun-sunos${UNAME_RELEASE}
    360     exit 0 ;;
     376    exit ;;
    361377    sun*:*:4.2BSD:*)
    362378    UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
     
    370386        ;;
    371387    esac
    372     exit 0 ;;
     388    exit ;;
    373389    aushp:SunOS:*:*)
    374390    echo sparc-auspex-sunos${UNAME_RELEASE}
    375     exit 0 ;;
     391    exit ;;
    376392    # The situation for MiNT is a little confusing.  The machine name
    377393    # can be virtually everything (everything which is not
     
    383399    # be no problem.
    384400    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
    385         echo m68k-atari-mint${UNAME_RELEASE}
    386     exit 0 ;;
     401    echo m68k-atari-mint${UNAME_RELEASE}
     402    exit ;;
    387403    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
    388404    echo m68k-atari-mint${UNAME_RELEASE}
    389         exit 0 ;;
     405    exit ;;
    390406    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
    391         echo m68k-atari-mint${UNAME_RELEASE}
    392     exit 0 ;;
     407    echo m68k-atari-mint${UNAME_RELEASE}
     408    exit ;;
    393409    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
    394         echo m68k-milan-mint${UNAME_RELEASE}
    395         exit 0 ;;
     410    echo m68k-milan-mint${UNAME_RELEASE}
     411    exit ;;
    396412    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
    397         echo m68k-hades-mint${UNAME_RELEASE}
    398         exit 0 ;;
     413    echo m68k-hades-mint${UNAME_RELEASE}
     414    exit ;;
    399415    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
    400         echo m68k-unknown-mint${UNAME_RELEASE}
    401         exit 0 ;;
     416    echo m68k-unknown-mint${UNAME_RELEASE}
     417    exit ;;
     418    m68k:machten:*:*)
     419    echo m68k-apple-machten${UNAME_RELEASE}
     420    exit ;;
    402421    powerpc:machten:*:*)
    403422    echo powerpc-apple-machten${UNAME_RELEASE}
    404     exit 0 ;;
     423    exit ;;
    405424    RISC*:Mach:*:*)
    406425    echo mips-dec-mach_bsd4.3
    407     exit 0 ;;
     426    exit ;;
    408427    RISC*:ULTRIX:*:*)
    409428    echo mips-dec-ultrix${UNAME_RELEASE}
    410     exit 0 ;;
     429    exit ;;
    411430    VAX*:ULTRIX*:*:*)
    412431    echo vax-dec-ultrix${UNAME_RELEASE}
    413     exit 0 ;;
     432    exit ;;
    414433    2020:CLIX:*:* | 2430:CLIX:*:*)
    415434    echo clipper-intergraph-clix${UNAME_RELEASE}
    416     exit 0 ;;
     435    exit ;;
    417436    mips:*:*:UMIPS | mips:*:*:RISCos)
    418437    eval $set_cc_for_build
     
    438457    }
    439458EOF
    440     $CC_FOR_BUILD $dummy.c -o $dummy \
    441       && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
    442       && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
    443     rm -f $dummy.c $dummy && rmdir $tmpdir
     459    $CC_FOR_BUILD -o $dummy $dummy.c &&
     460      dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
     461      SYSTEM_NAME=`$dummy $dummyarg` &&
     462        { echo "$SYSTEM_NAME"; exit; }
    444463    echo mips-mips-riscos${UNAME_RELEASE}
    445     exit 0 ;;
     464    exit ;;
    446465    Motorola:PowerMAX_OS:*:*)
    447466    echo powerpc-motorola-powermax
    448     exit 0 ;;
     467    exit ;;
    449468    Motorola:*:4.3:PL8-*)
    450469    echo powerpc-harris-powermax
    451     exit 0 ;;
    452     Night_Hawk:*:*:PowerMAX_OS)
     470    exit ;;
     471    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
    453472    echo powerpc-harris-powermax
    454     exit 0 ;;
     473    exit ;;
    455474    Night_Hawk:Power_UNIX:*:*)
    456475    echo powerpc-harris-powerunix
    457     exit 0 ;;
     476    exit ;;
    458477    m88k:CX/UX:7*:*)
    459478    echo m88k-harris-cxux7
    460     exit 0 ;;
     479    exit ;;
    461480    m88k:*:4*:R4*)
    462481    echo m88k-motorola-sysv4
    463     exit 0 ;;
     482    exit ;;
    464483    m88k:*:3*:R3*)
    465484    echo m88k-motorola-sysv3
    466     exit 0 ;;
     485    exit ;;
    467486    AViiON:dgux:*:*)
    468         # DG/UX returns AViiON for all architectures
    469         UNAME_PROCESSOR=`/usr/bin/uname -p`
     487    # DG/UX returns AViiON for all architectures
     488    UNAME_PROCESSOR=`/usr/bin/uname -p`
    470489    if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
    471490    then
     
    480499        echo i586-dg-dgux${UNAME_RELEASE}
    481500    fi
    482     exit 0 ;;
     501    exit ;;
    483502    M88*:DolphinOS:*:*) # DolphinOS (SVR3)
    484503    echo m88k-dolphin-sysv3
    485     exit 0 ;;
     504    exit ;;
    486505    M88*:*:R3*:*)
    487506    # Delta 88k system running SVR3
    488507    echo m88k-motorola-sysv3
    489     exit 0 ;;
     508    exit ;;
    490509    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
    491510    echo m88k-tektronix-sysv3
    492     exit 0 ;;
     511    exit ;;
    493512    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
    494513    echo m68k-tektronix-bsd
    495     exit 0 ;;
     514    exit ;;
    496515    *:IRIX*:*:*)
    497516    echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
    498     exit 0 ;;
     517    exit ;;
    499518    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
    500     echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
    501     exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
     519    echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
     520    exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
    502521    i*86:AIX:*:*)
    503522    echo i386-ibm-aix
    504     exit 0 ;;
     523    exit ;;
    505524    ia64:AIX:*:*)
    506525    if [ -x /usr/bin/oslevel ] ; then
     
    510529    fi
    511530    echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
    512     exit 0 ;;
     531    exit ;;
    513532    *:AIX:2:3)
    514533    if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
     
    525544            }
    526545EOF
    527         $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
    528         rm -f $dummy.c $dummy && rmdir $tmpdir
    529         echo rs6000-ibm-aix3.2.5
     546        if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
     547        then
     548            echo "$SYSTEM_NAME"
     549        else
     550            echo rs6000-ibm-aix3.2.5
     551        fi
    530552    elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
    531553        echo rs6000-ibm-aix3.2.4
     
    533555        echo rs6000-ibm-aix3.2
    534556    fi
    535     exit 0 ;;
    536     *:AIX:*:[45])
     557    exit ;;
     558    *:AIX:*:[4567])
    537559    IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
    538560    if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
     
    547569    fi
    548570    echo ${IBM_ARCH}-ibm-aix${IBM_REV}
    549     exit 0 ;;
     571    exit ;;
    550572    *:AIX:*:*)
    551573    echo rs6000-ibm-aix
    552     exit 0 ;;
     574    exit ;;
    553575    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
    554576    echo romp-ibm-bsd4.4
    555     exit 0 ;;
     577    exit ;;
    556578    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
    557579    echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
    558     exit 0 ;;                           # report: romp-ibm BSD 4.3
     580    exit ;;                             # report: romp-ibm BSD 4.3
    559581    *:BOSX:*:*)
    560582    echo rs6000-bull-bosx
    561     exit 0 ;;
     583    exit ;;
    562584    DPX/2?00:B.O.S.:*:*)
    563585    echo m68k-bull-sysv3
    564     exit 0 ;;
     586    exit ;;
    565587    9000/[34]??:4.3bsd:1.*:*)
    566588    echo m68k-hp-bsd
    567     exit 0 ;;
     589    exit ;;
    568590    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
    569591    echo m68k-hp-bsd4.4
    570     exit 0 ;;
     592    exit ;;
    571593    9000/[34678]??:HP-UX:*:*)
    572594    HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
     
    577599        if [ -x /usr/bin/getconf ]; then
    578600            sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
    579                     sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
    580                     case "${sc_cpu_version}" in
    581                       523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
    582                       528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
    583                       532)                      # CPU_PA_RISC2_0
    584                         case "${sc_kernel_bits}" in
    585                           32) HP_ARCH="hppa2.0n" ;;
    586                           64) HP_ARCH="hppa2.0w" ;;
     601            sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
     602            case "${sc_cpu_version}" in
     603              523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
     604              528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
     605              532)                      # CPU_PA_RISC2_0
     606            case "${sc_kernel_bits}" in
     607              32) HP_ARCH="hppa2.0n" ;;
     608              64) HP_ARCH="hppa2.0w" ;;
    587609              '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
    588                         esac ;;
    589                     esac
     610            esac ;;
     611            esac
    590612        fi
    591613        if [ "${HP_ARCH}" = "" ]; then
    592614            eval $set_cc_for_build
    593             sed 's/^              //' << EOF >$dummy.c
    594 
    595               #define _HPUX_SOURCE
    596               #include <stdlib.h>
    597               #include <unistd.h>
    598 
    599               int main ()
    600               {
    601               #if defined(_SC_KERNEL_BITS)
    602                   long bits = sysconf(_SC_KERNEL_BITS);
    603               #endif
    604                   long cpu  = sysconf (_SC_CPU_VERSION);
    605 
    606                   switch (cpu)
    607                 {
    608                 case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
    609                 case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
    610                 case CPU_PA_RISC2_0:
    611               #if defined(_SC_KERNEL_BITS)
    612                     switch (bits)
    613                     {
    614                     case 64: puts ("hppa2.0w"); break;
    615                     case 32: puts ("hppa2.0n"); break;
    616                     default: puts ("hppa2.0"); break;
    617                     } break;
    618               #else  /* !defined(_SC_KERNEL_BITS) */
    619                     puts ("hppa2.0"); break;
    620               #endif
    621                 default: puts ("hppa1.0"); break;
    622                 }
    623                   exit (0);
    624               }
     615            sed 's/^        //' << EOF >$dummy.c
     616
     617        #define _HPUX_SOURCE
     618        #include <stdlib.h>
     619        #include <unistd.h>
     620
     621        int main ()
     622        {
     623        #if defined(_SC_KERNEL_BITS)
     624            long bits = sysconf(_SC_KERNEL_BITS);
     625        #endif
     626            long cpu  = sysconf (_SC_CPU_VERSION);
     627
     628            switch (cpu)
     629            {
     630            case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
     631            case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
     632            case CPU_PA_RISC2_0:
     633        #if defined(_SC_KERNEL_BITS)
     634                switch (bits)
     635                {
     636                case 64: puts ("hppa2.0w"); break;
     637                case 32: puts ("hppa2.0n"); break;
     638                default: puts ("hppa2.0"); break;
     639                } break;
     640        #else  /* !defined(_SC_KERNEL_BITS) */
     641                puts ("hppa2.0"); break;
     642        #endif
     643            default: puts ("hppa1.0"); break;
     644            }
     645            exit (0);
     646        }
    625647EOF
    626             (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`$dummy`
    627             if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
    628             rm -f $dummy.c $dummy && rmdir $tmpdir
     648            (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
     649            test -z "$HP_ARCH" && HP_ARCH=hppa
    629650        fi ;;
    630651    esac
     652    if [ ${HP_ARCH} = "hppa2.0w" ]
     653    then
     654        eval $set_cc_for_build
     655
     656        # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
     657        # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
     658        # generating 64-bit code.  GNU and HP use different nomenclature:
     659        #
     660        # $ CC_FOR_BUILD=cc ./config.guess
     661        # => hppa2.0w-hp-hpux11.23
     662        # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
     663        # => hppa64-hp-hpux11.23
     664
     665        if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
     666        grep -q __LP64__
     667        then
     668        HP_ARCH="hppa2.0w"
     669        else
     670        HP_ARCH="hppa64"
     671        fi
     672    fi
    631673    echo ${HP_ARCH}-hp-hpux${HPUX_REV}
    632     exit 0 ;;
     674    exit ;;
    633675    ia64:HP-UX:*:*)
    634676    HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
    635677    echo ia64-hp-hpux${HPUX_REV}
    636     exit 0 ;;
     678    exit ;;
    637679    3050*:HI-UX:*:*)
    638680    eval $set_cc_for_build
     
    662704    }
    663705EOF
    664     $CC_FOR_BUILD $dummy.c -o $dummy && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
    665     rm -f $dummy.c $dummy && rmdir $tmpdir
     706    $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
     707        { echo "$SYSTEM_NAME"; exit; }
    666708    echo unknown-hitachi-hiuxwe2
    667     exit 0 ;;
     709    exit ;;
    668710    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
    669711    echo hppa1.1-hp-bsd
    670     exit 0 ;;
     712    exit ;;
    671713    9000/8??:4.3bsd:*:*)
    672714    echo hppa1.0-hp-bsd
    673     exit 0 ;;
     715    exit ;;
    674716    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
    675717    echo hppa1.0-hp-mpeix
    676     exit 0 ;;
     718    exit ;;
    677719    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
    678720    echo hppa1.1-hp-osf
    679     exit 0 ;;
     721    exit ;;
    680722    hp8??:OSF1:*:*)
    681723    echo hppa1.0-hp-osf
    682     exit 0 ;;
     724    exit ;;
    683725    i*86:OSF1:*:*)
    684726    if [ -x /usr/sbin/sysversion ] ; then
     
    687729        echo ${UNAME_MACHINE}-unknown-osf1
    688730    fi
    689     exit 0 ;;
     731    exit ;;
    690732    parisc*:Lites*:*:*)
    691733    echo hppa1.1-hp-lites
    692     exit 0 ;;
     734    exit ;;
    693735    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
    694736    echo c1-convex-bsd
    695         exit 0 ;;
     737    exit ;;
    696738    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
    697739    if getsysinfo -f scalar_acc
     
    699741    else echo c2-convex-bsd
    700742    fi
    701         exit 0 ;;
     743    exit ;;
    702744    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
    703745    echo c34-convex-bsd
    704         exit 0 ;;
     746    exit ;;
    705747    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
    706748    echo c38-convex-bsd
    707         exit 0 ;;
     749    exit ;;
    708750    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
    709751    echo c4-convex-bsd
    710         exit 0 ;;
     752    exit ;;
    711753    CRAY*Y-MP:*:*:*)
    712754    echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    713     exit 0 ;;
     755    exit ;;
    714756    CRAY*[A-Z]90:*:*:*)
    715757    echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
     
    717759          -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
    718760          -e 's/\.[^.]*$/.X/'
    719     exit 0 ;;
     761    exit ;;
    720762    CRAY*TS:*:*:*)
    721763    echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    722     exit 0 ;;
    723     CRAY*T3D:*:*:*)
    724     echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    725     exit 0 ;;
     764    exit ;;
    726765    CRAY*T3E:*:*:*)
    727766    echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    728     exit 0 ;;
     767    exit ;;
    729768    CRAY*SV1:*:*:*)
    730769    echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    731     exit 0 ;;
     770    exit ;;
     771    *:UNICOS/mp:*:*)
     772    echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     773    exit ;;
    732774    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
    733775    FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
    734         FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
    735         FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
    736         echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
    737         exit 0 ;;
     776    FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
     777    FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
     778    echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
     779    exit ;;
     780    5000:UNIX_System_V:4.*:*)
     781    FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
     782    FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
     783    echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
     784    exit ;;
    738785    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
    739786    echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
    740     exit 0 ;;
     787    exit ;;
    741788    sparc*:BSD/OS:*:*)
    742789    echo sparc-unknown-bsdi${UNAME_RELEASE}
    743     exit 0 ;;
     790    exit ;;
    744791    *:BSD/OS:*:*)
    745792    echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
    746     exit 0 ;;
     793    exit ;;
    747794    *:FreeBSD:*:*)
    748     # Determine whether the default compiler uses glibc.
    749     eval $set_cc_for_build
    750     sed 's/^    //' << EOF >$dummy.c
    751     #include <features.h>
    752     #if __GLIBC__ >= 2
    753     LIBC=gnu
    754     #else
    755     LIBC=
    756     #endif
    757 EOF
    758     eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
    759     rm -f $dummy.c && rmdir $tmpdir
    760     echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
    761     exit 0 ;;
     795    UNAME_PROCESSOR=`/usr/bin/uname -p`
     796    case ${UNAME_PROCESSOR} in
     797        amd64)
     798        echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
     799        *)
     800        echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
     801    esac
     802    exit ;;
    762803    i*:CYGWIN*:*)
    763804    echo ${UNAME_MACHINE}-pc-cygwin
    764     exit 0 ;;
    765     i*:MINGW*:*)
     805    exit ;;
     806    *:MINGW*:*)
    766807    echo ${UNAME_MACHINE}-pc-mingw32
    767     exit 0 ;;
     808    exit ;;
     809    i*:MSYS*:*)
     810    echo ${UNAME_MACHINE}-pc-msys
     811    exit ;;
     812    i*:windows32*:*)
     813    # uname -m includes "-pc" on this system.
     814    echo ${UNAME_MACHINE}-mingw32
     815    exit ;;
    768816    i*:PW*:*)
    769817    echo ${UNAME_MACHINE}-pc-pw32
    770     exit 0 ;;
    771     x86:Interix*:3*)
    772     echo i386-pc-interix3
    773     exit 0 ;;
     818    exit ;;
     819    *:Interix*:*)
     820    case ${UNAME_MACHINE} in
     821        x86)
     822        echo i586-pc-interix${UNAME_RELEASE}
     823        exit ;;
     824        authenticamd | genuineintel | EM64T)
     825        echo x86_64-unknown-interix${UNAME_RELEASE}
     826        exit ;;
     827        IA64)
     828        echo ia64-unknown-interix${UNAME_RELEASE}
     829        exit ;;
     830    esac ;;
     831    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
     832    echo i${UNAME_MACHINE}-pc-mks
     833    exit ;;
     834    8664:Windows_NT:*)
     835    echo x86_64-pc-mks
     836    exit ;;
    774837    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
    775838    # How do we know it's Interix rather than the generic POSIX subsystem?
    776839    # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
    777840    # UNAME_MACHINE based on the output of uname instead of i386?
    778     echo i386-pc-interix
    779     exit 0 ;;
     841    echo i586-pc-interix
     842    exit ;;
    780843    i*:UWIN*:*)
    781844    echo ${UNAME_MACHINE}-pc-uwin
    782     exit 0 ;;
     845    exit ;;
     846    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
     847    echo x86_64-unknown-cygwin
     848    exit ;;
    783849    p*:CYGWIN*:*)
    784850    echo powerpcle-unknown-cygwin
    785     exit 0 ;;
     851    exit ;;
    786852    prep*:SunOS:5.*:*)
    787853    echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    788     exit 0 ;;
     854    exit ;;
    789855    *:GNU:*:*)
     856    # the GNU system
    790857    echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
    791     exit 0 ;;
     858    exit ;;
     859    *:GNU/*:*:*)
     860    # other systems with GNU libc and userland
     861    echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
     862    exit ;;
    792863    i*86:Minix:*:*)
    793864    echo ${UNAME_MACHINE}-pc-minix
    794     exit 0 ;;
    795     arm*:Linux:*:*)
    796     echo ${UNAME_MACHINE}-unknown-linux-gnu
    797     exit 0 ;;
    798     ia64:Linux:*:*)
    799     echo ${UNAME_MACHINE}-unknown-linux-gnu
    800     exit 0 ;;
    801     m68*:Linux:*:*)
    802     echo ${UNAME_MACHINE}-unknown-linux-gnu
    803     exit 0 ;;
    804     mips:Linux:*:*)
    805     eval $set_cc_for_build
    806     sed 's/^    //' << EOF >$dummy.c
    807     #undef CPU
    808     #undef mips
    809     #undef mipsel
    810     #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
    811     CPU=mipsel
    812     #else
    813     #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
    814     CPU=mips
    815     #else
    816     CPU=
    817     #endif
    818     #endif
    819 EOF
    820     eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
    821     rm -f $dummy.c && rmdir $tmpdir
    822     test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
    823     ;;
    824     ppc:Linux:*:*)
    825     echo powerpc-unknown-linux-gnu
    826     exit 0 ;;
    827     ppc64:Linux:*:*)
    828     echo powerpc64-unknown-linux-gnu
    829     exit 0 ;;
     865    exit ;;
    830866    alpha:Linux:*:*)
    831867    case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
     
    837873      EV67)  UNAME_MACHINE=alphaev67 ;;
    838874      EV68*) UNAME_MACHINE=alphaev68 ;;
    839         esac
    840     objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
     875    esac
     876    objdump --private-headers /bin/sh | grep -q ld.so.1
    841877    if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
    842878    echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
    843     exit 0 ;;
     879    exit ;;
     880    arm*:Linux:*:*)
     881    eval $set_cc_for_build
     882    if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
     883        | grep -q __ARM_EABI__
     884    then
     885        echo ${UNAME_MACHINE}-unknown-linux-gnu
     886    else
     887        if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
     888        | grep -q __ARM_PCS_VFP
     889        then
     890        echo ${UNAME_MACHINE}-unknown-linux-gnueabi
     891        else
     892        echo ${UNAME_MACHINE}-unknown-linux-gnueabihf
     893        fi
     894    fi
     895    exit ;;
     896    avr32*:Linux:*:*)
     897    echo ${UNAME_MACHINE}-unknown-linux-gnu
     898    exit ;;
     899    cris:Linux:*:*)
     900    echo cris-axis-linux-gnu
     901    exit ;;
     902    crisv32:Linux:*:*)
     903    echo crisv32-axis-linux-gnu
     904    exit ;;
     905    frv:Linux:*:*)
     906    echo frv-unknown-linux-gnu
     907    exit ;;
     908    hexagon:Linux:*:*)
     909    echo hexagon-unknown-linux-gnu
     910    exit ;;
     911    i*86:Linux:*:*)
     912    LIBC=gnu
     913    eval $set_cc_for_build
     914    sed 's/^    //' << EOF >$dummy.c
     915    #ifdef __dietlibc__
     916    LIBC=dietlibc
     917    #endif
     918EOF
     919    eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
     920    echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
     921    exit ;;
     922    ia64:Linux:*:*)
     923    echo ${UNAME_MACHINE}-unknown-linux-gnu
     924    exit ;;
     925    m32r*:Linux:*:*)
     926    echo ${UNAME_MACHINE}-unknown-linux-gnu
     927    exit ;;
     928    m68*:Linux:*:*)
     929    echo ${UNAME_MACHINE}-unknown-linux-gnu
     930    exit ;;
     931    mips:Linux:*:* | mips64:Linux:*:*)
     932    eval $set_cc_for_build
     933    sed 's/^    //' << EOF >$dummy.c
     934    #undef CPU
     935    #undef ${UNAME_MACHINE}
     936    #undef ${UNAME_MACHINE}el
     937    #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
     938    CPU=${UNAME_MACHINE}el
     939    #else
     940    #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
     941    CPU=${UNAME_MACHINE}
     942    #else
     943    CPU=
     944    #endif
     945    #endif
     946EOF
     947    eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
     948    test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
     949    ;;
     950    or32:Linux:*:*)
     951    echo or32-unknown-linux-gnu
     952    exit ;;
     953    padre:Linux:*:*)
     954    echo sparc-unknown-linux-gnu
     955    exit ;;
     956    parisc64:Linux:*:* | hppa64:Linux:*:*)
     957    echo hppa64-unknown-linux-gnu
     958    exit ;;
    844959    parisc:Linux:*:* | hppa:Linux:*:*)
    845960    # Look for CPU level
     
    849964      *)    echo hppa-unknown-linux-gnu ;;
    850965    esac
    851     exit 0 ;;
    852     parisc64:Linux:*:* | hppa64:Linux:*:*)
    853     echo hppa64-unknown-linux-gnu
    854     exit 0 ;;
     966    exit ;;
     967    ppc64:Linux:*:*)
     968    echo powerpc64-unknown-linux-gnu
     969    exit ;;
     970    ppc:Linux:*:*)
     971    echo powerpc-unknown-linux-gnu
     972    exit ;;
    855973    s390:Linux:*:* | s390x:Linux:*:*)
    856974    echo ${UNAME_MACHINE}-ibm-linux
    857     exit 0 ;;
     975    exit ;;
     976    sh64*:Linux:*:*)
     977    echo ${UNAME_MACHINE}-unknown-linux-gnu
     978    exit ;;
    858979    sh*:Linux:*:*)
    859980    echo ${UNAME_MACHINE}-unknown-linux-gnu
    860     exit 0 ;;
     981    exit ;;
    861982    sparc:Linux:*:* | sparc64:Linux:*:*)
    862983    echo ${UNAME_MACHINE}-unknown-linux-gnu
    863     exit 0 ;;
     984    exit ;;
     985    tile*:Linux:*:*)
     986    echo ${UNAME_MACHINE}-unknown-linux-gnu
     987    exit ;;
     988    vax:Linux:*:*)
     989    echo ${UNAME_MACHINE}-dec-linux-gnu
     990    exit ;;
    864991    x86_64:Linux:*:*)
    865992    echo x86_64-unknown-linux-gnu
    866     exit 0 ;;
    867     i*86:Linux:*:*)
    868     # The BFD linker knows what the default object file format is, so
    869     # first see if it will tell us. cd to the root directory to prevent
    870     # problems with other programs or directories called `ld' in the path.
    871     # Set LC_ALL=C to ensure ld outputs messages in English.
    872     ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
    873              | sed -ne '/supported targets:/!d
    874                     s/[     ][  ]*/ /g
    875                     s/.*supported targets: *//
    876                     s/ .*//
    877                     p'`
    878         case "$ld_supported_targets" in
    879       elf32-i386)
    880         TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
    881         ;;
    882       a.out-i386-linux)
    883         echo "${UNAME_MACHINE}-pc-linux-gnuaout"
    884         exit 0 ;;
    885       coff-i386)
    886         echo "${UNAME_MACHINE}-pc-linux-gnucoff"
    887         exit 0 ;;
    888       "")
    889         # Either a pre-BFD a.out linker (linux-gnuoldld) or
    890         # one that does not give us useful --help.
    891         echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
    892         exit 0 ;;
    893     esac
    894     # Determine whether the default compiler is a.out or elf
    895     eval $set_cc_for_build
    896     sed 's/^    //' << EOF >$dummy.c
    897     #include <features.h>
    898     #ifdef __ELF__
    899     # ifdef __GLIBC__
    900     #  if __GLIBC__ >= 2
    901     LIBC=gnu
    902     #  else
    903     LIBC=gnulibc1
    904     #  endif
    905     # else
    906     LIBC=gnulibc1
    907     # endif
    908     #else
    909     #ifdef __INTEL_COMPILER
    910     LIBC=gnu
    911     #else
    912     LIBC=gnuaout
    913     #endif
    914     #endif
    915 EOF
    916     eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
    917     rm -f $dummy.c && rmdir $tmpdir
    918     test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
    919     test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
    920     ;;
     993    exit ;;
     994    xtensa*:Linux:*:*)
     995    echo ${UNAME_MACHINE}-unknown-linux-gnu
     996    exit ;;
    921997    i*86:DYNIX/ptx:4*:*)
    922998    # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
     
    9241000    # sysname and nodename.
    9251001    echo i386-sequent-sysv4
    926     exit 0 ;;
     1002    exit ;;
    9271003    i*86:UNIX_SV:4.2MP:2.*)
    928         # Unixware is an offshoot of SVR4, but it has its own version
    929         # number series starting with 2...
    930         # I am not positive that other SVR4 systems won't match this,
     1004    # Unixware is an offshoot of SVR4, but it has its own version
     1005    # number series starting with 2...
     1006    # I am not positive that other SVR4 systems won't match this,
    9311007    # I just have to hope.  -- rms.
    932         # Use sysv4.2uw... so that sysv4* matches it.
     1008    # Use sysv4.2uw... so that sysv4* matches it.
    9331009    echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
    934     exit 0 ;;
     1010    exit ;;
     1011    i*86:OS/2:*:*)
     1012    # If we were able to find `uname', then EMX Unix compatibility
     1013    # is probably installed.
     1014    echo ${UNAME_MACHINE}-pc-os2-emx
     1015    exit ;;
     1016    i*86:XTS-300:*:STOP)
     1017    echo ${UNAME_MACHINE}-unknown-stop
     1018    exit ;;
     1019    i*86:atheos:*:*)
     1020    echo ${UNAME_MACHINE}-unknown-atheos
     1021    exit ;;
     1022    i*86:syllable:*:*)
     1023    echo ${UNAME_MACHINE}-pc-syllable
     1024    exit ;;
     1025    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
     1026    echo i386-unknown-lynxos${UNAME_RELEASE}
     1027    exit ;;
     1028    i*86:*DOS:*:*)
     1029    echo ${UNAME_MACHINE}-pc-msdosdjgpp
     1030    exit ;;
    9351031    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
    9361032    UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
     
    9401036        echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
    9411037    fi
    942     exit 0 ;;
    943     i*86:*:5:[78]*)
     1038    exit ;;
     1039    i*86:*:5:[678]*)
     1040    # UnixWare 7.x, OpenUNIX and OpenServer 6.
    9441041    case `/bin/uname -X | grep "^Machine"` in
    9451042        *486*)       UNAME_MACHINE=i486 ;;
     
    9481045    esac
    9491046    echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
    950     exit 0 ;;
     1047    exit ;;
    9511048    i*86:*:3.2:*)
    9521049    if test -f /usr/options/cb.name; then
     
    9661063        echo ${UNAME_MACHINE}-pc-sysv32
    9671064    fi
    968     exit 0 ;;
    969     i*86:*DOS:*:*)
    970     echo ${UNAME_MACHINE}-pc-msdosdjgpp
    971     exit 0 ;;
     1065    exit ;;
    9721066    pc:*:*:*)
    9731067    # Left here for compatibility:
    974         # uname -m prints for DJGPP always 'pc', but it prints nothing about
    975         # the processor, so we play safe by assuming i386.
    976     echo i386-pc-msdosdjgpp
    977         exit 0 ;;
     1068    # uname -m prints for DJGPP always 'pc', but it prints nothing about
     1069    # the processor, so we play safe by assuming i586.
     1070    # Note: whatever this is, it MUST be the same as what config.sub
     1071    # prints for the "djgpp" host, or else GDB configury will decide that
     1072    # this is a cross-build.
     1073    echo i586-pc-msdosdjgpp
     1074    exit ;;
    9781075    Intel:Mach:3*:*)
    9791076    echo i386-pc-mach3
    980     exit 0 ;;
     1077    exit ;;
    9811078    paragon:*:*:*)
    9821079    echo i860-intel-osf1
    983     exit 0 ;;
     1080    exit ;;
    9841081    i860:*:4.*:*) # i860-SVR4
    9851082    if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
     
    9881085      echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
    9891086    fi
    990     exit 0 ;;
     1087    exit ;;
    9911088    mini*:CTIX:SYS*5:*)
    9921089    # "miniframe"
    9931090    echo m68010-convergent-sysv
    994     exit 0 ;;
     1091    exit ;;
    9951092    mc68k:UNIX:SYSTEM5:3.51m)
    9961093    echo m68k-convergent-sysv
    997     exit 0 ;;
    998     M68*:*:R3V[567]*:*)
    999     test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
    1000     3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
     1094    exit ;;
     1095    M680?0:D-NIX:5.3:*)
     1096    echo m68k-diab-dnix
     1097    exit ;;
     1098    M68*:*:R3V[5678]*:*)
     1099    test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
     1100    3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
    10011101    OS_REL=''
    10021102    test -r /etc/.relid \
    10031103    && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
    10041104    /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
    1005       && echo i486-ncr-sysv4.3${OS_REL} && exit 0
     1105      && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
    10061106    /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
    1007       && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
     1107      && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
    10081108    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
    1009         /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
    1010           && echo i486-ncr-sysv4 && exit 0 ;;
     1109    /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
     1110      && { echo i486-ncr-sysv4; exit; } ;;
     1111    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
     1112    OS_REL='.3'
     1113    test -r /etc/.relid \
     1114        && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
     1115    /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
     1116        && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
     1117    /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
     1118        && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
     1119    /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
     1120        && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
    10111121    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
    10121122    echo m68k-unknown-lynxos${UNAME_RELEASE}
    1013     exit 0 ;;
     1123    exit ;;
    10141124    mc68030:UNIX_System_V:4.*:*)
    10151125    echo m68k-atari-sysv4
    1016     exit 0 ;;
    1017     i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
    1018     echo i386-unknown-lynxos${UNAME_RELEASE}
    1019     exit 0 ;;
     1126    exit ;;
    10201127    TSUNAMI:LynxOS:2.*:*)
    10211128    echo sparc-unknown-lynxos${UNAME_RELEASE}
    1022     exit 0 ;;
     1129    exit ;;
    10231130    rs6000:LynxOS:2.*:*)
    10241131    echo rs6000-unknown-lynxos${UNAME_RELEASE}
    1025     exit 0 ;;
    1026     PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
     1132    exit ;;
     1133    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
    10271134    echo powerpc-unknown-lynxos${UNAME_RELEASE}
    1028     exit 0 ;;
     1135    exit ;;
    10291136    SM[BE]S:UNIX_SV:*:*)
    10301137    echo mips-dde-sysv${UNAME_RELEASE}
    1031     exit 0 ;;
     1138    exit ;;
    10321139    RM*:ReliantUNIX-*:*:*)
    10331140    echo mips-sni-sysv4
    1034     exit 0 ;;
     1141    exit ;;
    10351142    RM*:SINIX-*:*:*)
    10361143    echo mips-sni-sysv4
    1037     exit 0 ;;
     1144    exit ;;
    10381145    *:SINIX-*:*:*)
    10391146    if uname -p 2>/dev/null >/dev/null ; then
     
    10431150        echo ns32k-sni-sysv
    10441151    fi
    1045     exit 0 ;;
    1046     PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
    1047                       # says <Richard.M.Bartel@ccMail.Census.GOV>
    1048         echo i586-unisys-sysv4
    1049         exit 0 ;;
     1152    exit ;;
     1153    PENTIUM:*:4.0*:*)   # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
     1154            # says <Richard.M.Bartel@ccMail.Census.GOV>
     1155    echo i586-unisys-sysv4
     1156    exit ;;
    10501157    *:UNIX_System_V:4*:FTX*)
    10511158    # From Gerald Hewes <hewes@openmarket.com>.
    10521159    # How about differentiating between stratus architectures? -djm
    10531160    echo hppa1.1-stratus-sysv4
    1054     exit 0 ;;
     1161    exit ;;
    10551162    *:*:*:FTX*)
    10561163    # From seanf@swdc.stratus.com.
    10571164    echo i860-stratus-sysv4
    1058     exit 0 ;;
     1165    exit ;;
     1166    i*86:VOS:*:*)
     1167    # From Paul.Green@stratus.com.
     1168    echo ${UNAME_MACHINE}-stratus-vos
     1169    exit ;;
    10591170    *:VOS:*:*)
    10601171    # From Paul.Green@stratus.com.
    10611172    echo hppa1.1-stratus-vos
    1062     exit 0 ;;
     1173    exit ;;
    10631174    mc68*:A/UX:*:*)
    10641175    echo m68k-apple-aux${UNAME_RELEASE}
    1065     exit 0 ;;
     1176    exit ;;
    10661177    news*:NEWS-OS:6*:*)
    10671178    echo mips-sony-newsos6
    1068     exit 0 ;;
     1179    exit ;;
    10691180    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
    10701181    if [ -d /usr/nec ]; then
    1071             echo mips-nec-sysv${UNAME_RELEASE}
     1182        echo mips-nec-sysv${UNAME_RELEASE}
    10721183    else
    1073             echo mips-unknown-sysv${UNAME_RELEASE}
    1074     fi
    1075         exit 0 ;;
     1184        echo mips-unknown-sysv${UNAME_RELEASE}
     1185    fi
     1186    exit ;;
    10761187    BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
    10771188    echo powerpc-be-beos
    1078     exit 0 ;;
     1189    exit ;;
    10791190    BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
    10801191    echo powerpc-apple-beos
    1081     exit 0 ;;
     1192    exit ;;
    10821193    BePC:BeOS:*:*)  # BeOS running on Intel PC compatible.
    10831194    echo i586-pc-beos
    1084     exit 0 ;;
     1195    exit ;;
     1196    BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
     1197    echo i586-pc-haiku
     1198    exit ;;
    10851199    SX-4:SUPER-UX:*:*)
    10861200    echo sx4-nec-superux${UNAME_RELEASE}
    1087     exit 0 ;;
     1201    exit ;;
    10881202    SX-5:SUPER-UX:*:*)
    10891203    echo sx5-nec-superux${UNAME_RELEASE}
    1090     exit 0 ;;
     1204    exit ;;
    10911205    SX-6:SUPER-UX:*:*)
    10921206    echo sx6-nec-superux${UNAME_RELEASE}
    1093     exit 0 ;;
     1207    exit ;;
     1208    SX-7:SUPER-UX:*:*)
     1209    echo sx7-nec-superux${UNAME_RELEASE}
     1210    exit ;;
     1211    SX-8:SUPER-UX:*:*)
     1212    echo sx8-nec-superux${UNAME_RELEASE}
     1213    exit ;;
     1214    SX-8R:SUPER-UX:*:*)
     1215    echo sx8r-nec-superux${UNAME_RELEASE}
     1216    exit ;;
    10941217    Power*:Rhapsody:*:*)
    10951218    echo powerpc-apple-rhapsody${UNAME_RELEASE}
    1096     exit 0 ;;
     1219    exit ;;
    10971220    *:Rhapsody:*:*)
    10981221    echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
    1099     exit 0 ;;
     1222    exit ;;
    11001223    *:Darwin:*:*)
    1101     echo `uname -p`-apple-darwin${UNAME_RELEASE}
    1102     exit 0 ;;
     1224    UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
     1225    case $UNAME_PROCESSOR in
     1226        i386)
     1227        eval $set_cc_for_build
     1228        if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
     1229          if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
     1230              (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
     1231              grep IS_64BIT_ARCH >/dev/null
     1232          then
     1233              UNAME_PROCESSOR="x86_64"
     1234          fi
     1235        fi ;;
     1236        unknown) UNAME_PROCESSOR=powerpc ;;
     1237    esac
     1238    echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
     1239    exit ;;
    11031240    *:procnto*:*:* | *:QNX:[0123456789]*:*)
    11041241    UNAME_PROCESSOR=`uname -p`
     
    11081245    fi
    11091246    echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
    1110     exit 0 ;;
     1247    exit ;;
    11111248    *:QNX:*:4*)
    11121249    echo i386-pc-qnx
    1113     exit 0 ;;
    1114     NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
     1250    exit ;;
     1251    NEO-?:NONSTOP_KERNEL:*:*)
     1252    echo neo-tandem-nsk${UNAME_RELEASE}
     1253    exit ;;
     1254    NSE-?:NONSTOP_KERNEL:*:*)
     1255    echo nse-tandem-nsk${UNAME_RELEASE}
     1256    exit ;;
     1257    NSR-?:NONSTOP_KERNEL:*:*)
    11151258    echo nsr-tandem-nsk${UNAME_RELEASE}
    1116     exit 0 ;;
     1259    exit ;;
    11171260    *:NonStop-UX:*:*)
    11181261    echo mips-compaq-nonstopux
    1119     exit 0 ;;
     1262    exit ;;
    11201263    BS2000:POSIX*:*:*)
    11211264    echo bs2000-siemens-sysv
    1122     exit 0 ;;
     1265    exit ;;
    11231266    DS/*:UNIX_System_V:*:*)
    11241267    echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
    1125     exit 0 ;;
     1268    exit ;;
    11261269    *:Plan9:*:*)
    11271270    # "uname -m" is not consistent, so use $cputype instead. 386
     
    11341277    fi
    11351278    echo ${UNAME_MACHINE}-unknown-plan9
    1136     exit 0 ;;
    1137     i*86:OS/2:*:*)
    1138     # If we were able to find `uname', then EMX Unix compatibility
    1139     # is probably installed.
    1140     echo ${UNAME_MACHINE}-pc-os2-emx
    1141     exit 0 ;;
     1279    exit ;;
    11421280    *:TOPS-10:*:*)
    11431281    echo pdp10-unknown-tops10
    1144     exit 0 ;;
     1282    exit ;;
    11451283    *:TENEX:*:*)
    11461284    echo pdp10-unknown-tenex
    1147     exit 0 ;;
     1285    exit ;;
    11481286    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
    11491287    echo pdp10-dec-tops20
    1150     exit 0 ;;
     1288    exit ;;
    11511289    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
    11521290    echo pdp10-xkl-tops20
    1153     exit 0 ;;
     1291    exit ;;
    11541292    *:TOPS-20:*:*)
    11551293    echo pdp10-unknown-tops20
    1156     exit 0 ;;
     1294    exit ;;
    11571295    *:ITS:*:*)
    11581296    echo pdp10-unknown-its
    1159     exit 0 ;;
    1160     i*86:XTS-300:*:STOP)
    1161     echo ${UNAME_MACHINE}-unknown-stop
    1162     exit 0 ;;
    1163     i*86:atheos:*:*)
    1164     echo ${UNAME_MACHINE}-unknown-atheos
    1165     exit 0 ;;
     1297    exit ;;
     1298    SEI:*:*:SEIUX)
     1299    echo mips-sei-seiux${UNAME_RELEASE}
     1300    exit ;;
     1301    *:DragonFly:*:*)
     1302    echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
     1303    exit ;;
     1304    *:*VMS:*:*)
     1305    UNAME_MACHINE=`(uname -p) 2>/dev/null`
     1306    case "${UNAME_MACHINE}" in
     1307        A*) echo alpha-dec-vms ; exit ;;
     1308        I*) echo ia64-dec-vms ; exit ;;
     1309        V*) echo vax-dec-vms ; exit ;;
     1310    esac ;;
     1311    *:XENIX:*:SysV)
     1312    echo i386-pc-xenix
     1313    exit ;;
     1314    i*86:skyos:*:*)
     1315    echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
     1316    exit ;;
     1317    i*86:rdos:*:*)
     1318    echo ${UNAME_MACHINE}-pc-rdos
     1319    exit ;;
     1320    i*86:AROS:*:*)
     1321    echo ${UNAME_MACHINE}-pc-aros
     1322    exit ;;
    11661323esac
    11671324
     
    11861343  printf ("m68k-sony-newsos%s\n",
    11871344#ifdef NEWSOS4
    1188           "4"
     1345    "4"
    11891346#else
    1190       ""
    1191 #endif
    1192          ); exit (0);
     1347    ""
     1348#endif
     1349    ); exit (0);
    11931350#endif
    11941351#endif
    11951352
    11961353#if defined (__arm) && defined (__acorn) && defined (__unix)
    1197   printf ("arm-acorn-riscix"); exit (0);
     1354  printf ("arm-acorn-riscix\n"); exit (0);
    11981355#endif
    11991356
     
    12841441EOF
    12851442
    1286 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
    1287 rm -f $dummy.c $dummy && rmdir $tmpdir
     1443$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
     1444    { echo "$SYSTEM_NAME"; exit; }
    12881445
    12891446# Apollos put the system type in the environment.
    12901447
    1291 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
     1448test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
    12921449
    12931450# Convex versions that predate uname can use getsysinfo(1)
     
    12981455    c1*)
    12991456    echo c1-convex-bsd
    1300     exit 0 ;;
     1457    exit ;;
    13011458    c2*)
    13021459    if getsysinfo -f scalar_acc
     
    13041461    else echo c2-convex-bsd
    13051462    fi
    1306     exit 0 ;;
     1463    exit ;;
    13071464    c34*)
    13081465    echo c34-convex-bsd
    1309     exit 0 ;;
     1466    exit ;;
    13101467    c38*)
    13111468    echo c38-convex-bsd
    1312     exit 0 ;;
     1469    exit ;;
    13131470    c4*)
    13141471    echo c4-convex-bsd
    1315     exit 0 ;;
     1472    exit ;;
    13161473    esac
    13171474fi
     
    13241481download the most up to date version of the config scripts from
    13251482
    1326     ftp://ftp.gnu.org/pub/gnu/config/
     1483  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
     1484and
     1485  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
    13271486
    13281487If the version you run ($0) is already up to date, please
  • main/trunk/greenstone2/common-src/packages/gdbm/gdbm-1.8.3/config.sub

    r18019 r26773  
    22# Configuration validation subroutine script.
    33#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
    4 #   2000, 2001, 2002 Free Software Foundation, Inc.
    5 
    6 timestamp='2002-09-05'
     4#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
     5#   2011 Free Software Foundation, Inc.
     6
     7timestamp='2011-11-11'
    78
    89# This file is (in principle) common to ALL GNU software.
     
    2223# You should have received a copy of the GNU General Public License
    2324# along with this program; if not, write to the Free Software
    24 # Foundation, Inc., 59 Temple Place - Suite 330,
    25 # Boston, MA 02111-1307, USA.
    26 
     25# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
     26# 02110-1301, USA.
     27#
    2728# As a special exception to the GNU General Public License, if you
    2829# distribute this file as part of a program that contains a
     
    3031# the same distribution terms that you use for the rest of that program.
    3132
     33
    3234# Please send patches to <config-patches@gnu.org>.  Submit a context
    33 # diff and a properly formatted ChangeLog entry.
     35# diff and a properly formatted GNU ChangeLog entry.
    3436#
    3537# Configuration subroutine to validate and canonicalize a configuration type.
     
    3739# If it is invalid, we print an error message on stderr and exit with code 1.
    3840# Otherwise, we print the canonical config type on stdout and succeed.
     41
     42# You can get the latest version of this script from:
     43# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
    3944
    4045# This file is supposed to be the same for all GNU packages
     
    7176GNU config.sub ($timestamp)
    7277
    73 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
    74 Free Software Foundation, Inc.
     78Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
     792001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
     80Software Foundation, Inc.
    7581
    7682This is free software; see the source for copying conditions.  There is NO
     
    8490  case $1 in
    8591    --time-stamp | --time* | -t )
    86        echo "$timestamp" ; exit 0 ;;
     92       echo "$timestamp" ; exit ;;
    8793    --version | -v )
    88        echo "$version" ; exit 0 ;;
     94       echo "$version" ; exit ;;
    8995    --help | --h* | -h )
    90        echo "$usage"; exit 0 ;;
     96       echo "$usage"; exit ;;
    9197    -- )     # Stop option processing
    9298       shift; break ;;
     
    100106       # First pass through any local machine types.
    101107       echo $1
    102        exit 0;;
     108       exit ;;
    103109
    104110    * )
     
    119125maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
    120126case $maybe_os in
    121   nto-qnx* | linux-gnu* | freebsd*-gnu* | storm-chaos* | os2-emx* | windows32-* | rtmk-nova*)
     127  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
     128  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
     129  knetbsd*-gnu* | netbsd*-gnu* | \
     130  kopensolaris*-gnu* | \
     131  storm-chaos* | os2-emx* | rtmk-nova*)
    122132    os=-$maybe_os
    123133    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     
    145155    -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
    146156    -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
    147     -apple | -axis)
     157    -apple | -axis | -knuth | -cray | -microblaze)
    148158        os=
    149159        basic_machine=$1
     160        ;;
     161    -bluegene*)
     162        os=-cnk
    150163        ;;
    151164    -sim | -cisco | -oki | -wec | -winbond)
     
    163176        basic_machine=$1
    164177        ;;
    165     -chorusrdb)
    166         os=-chorusrdb
     178    -chorusrdb)
     179        os=-chorusrdb
    167180        basic_machine=$1
    168         ;;
     181        ;;
    169182    -hiux*)
    170183        os=-hiuxwe2
     184        ;;
     185    -sco6)
     186        os=-sco5v6
     187        basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
    171188        ;;
    172189    -sco5)
     
    183200        ;;
    184201    -sco3.2v[4-9]*)
     202        # Don't forget version if it is 3.2v4 or newer.
     203        basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
     204        ;;
     205    -sco5v6*)
    185206        # Don't forget version if it is 3.2v4 or newer.
    186207        basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
     
    229250    | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
    230251    | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
    231     | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
    232     | clipper \
     252    | am33_2.0 \
     253    | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
     254        | be32 | be64 \
     255    | bfin \
     256    | c4x | clipper \
    233257    | d10v | d30v | dlx | dsp16xx \
    234     | fr30 | frv \
     258    | epiphany \
     259    | fido | fr30 | frv \
    235260    | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
     261    | hexagon \
    236262    | i370 | i860 | i960 | ia64 \
    237     | ip2k \
    238     | m32r | m68000 | m68k | m88k | mcore \
     263    | ip2k | iq2000 \
     264    | le32 | le64 \
     265    | lm32 \
     266    | m32c | m32r | m32rle | m68000 | m68k | m88k \
     267    | maxq | mb | microblaze | mcore | mep | metag \
    239268    | mips | mipsbe | mipseb | mipsel | mipsle \
    240269    | mips16 \
    241270    | mips64 | mips64el \
     271    | mips64octeon | mips64octeonel \
     272    | mips64orion | mips64orionel \
     273    | mips64r5900 | mips64r5900el \
    242274    | mips64vr | mips64vrel \
    243     | mips64orion | mips64orionel \
    244275    | mips64vr4100 | mips64vr4100el \
    245276    | mips64vr4300 | mips64vr4300el \
    246277    | mips64vr5000 | mips64vr5000el \
     278    | mips64vr5900 | mips64vr5900el \
    247279    | mipsisa32 | mipsisa32el \
     280    | mipsisa32r2 | mipsisa32r2el \
    248281    | mipsisa64 | mipsisa64el \
     282    | mipsisa64r2 | mipsisa64r2el \
    249283    | mipsisa64sb1 | mipsisa64sb1el \
    250284    | mipsisa64sr71k | mipsisa64sr71kel \
    251285    | mipstx39 | mipstx39el \
    252286    | mn10200 | mn10300 \
     287    | moxie \
     288    | mt \
     289    | msp430 \
     290    | nds32 | nds32le | nds32be \
     291    | nios | nios2 \
    253292    | ns16k | ns32k \
    254     | openrisc | or32 \
     293    | open8 \
     294    | or32 \
    255295    | pdp10 | pdp11 | pj | pjl \
    256     | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
     296    | powerpc | powerpc64 | powerpc64le | powerpcle \
    257297    | pyramid \
    258     | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
     298    | rl78 | rx \
     299    | score \
     300    | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
    259301    | sh64 | sh64le \
    260     | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
    261     | strongarm \
    262     | tahoe | thumb | tic80 | tron \
    263     | v850 | v850e \
     302    | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
     303    | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
     304    | spu \
     305    | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
     306    | ubicom32 \
     307    | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
    264308    | we32k \
    265     | x86 | xscale | xstormy16 | xtensa \
    266     | z8k)
     309    | x86 | xc16x | xstormy16 | xtensa \
     310    | z8k | z80)
    267311        basic_machine=$basic_machine-unknown
    268312        ;;
    269     m6811 | m68hc11 | m6812 | m68hc12)
     313    c54x)
     314        basic_machine=tic54x-unknown
     315        ;;
     316    c55x)
     317        basic_machine=tic55x-unknown
     318        ;;
     319    c6x)
     320        basic_machine=tic6x-unknown
     321        ;;
     322    m6811 | m68hc11 | m6812 | m68hc12 | picochip)
    270323        # Motorola 68HC11/12.
    271324        basic_machine=$basic_machine-unknown
     
    273326        ;;
    274327    m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
     328        ;;
     329    ms1)
     330        basic_machine=mt-unknown
     331        ;;
     332
     333    strongarm | thumb | xscale)
     334        basic_machine=arm-unknown
     335        ;;
     336
     337    xscaleeb)
     338        basic_machine=armeb-unknown
     339        ;;
     340
     341    xscaleel)
     342        basic_machine=armel-unknown
    275343        ;;
    276344
     
    293361    | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
    294362    | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
    295     | avr-* \
    296     | bs2000-* \
    297     | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \
    298     | clipper-* | cydra-* \
     363    | avr-* | avr32-* \
     364    | be32-* | be64-* \
     365    | bfin-* | bs2000-* \
     366    | c[123]* | c30-* | [cjt]90-* | c4x-* \
     367    | clipper-* | craynv-* | cydra-* \
    299368    | d10v-* | d30v-* | dlx-* \
    300369    | elxsi-* \
    301     | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
     370    | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
    302371    | h8300-* | h8500-* \
    303372    | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
     373    | hexagon-* \
    304374    | i*86-* | i860-* | i960-* | ia64-* \
    305     | ip2k-* \
    306     | m32r-* \
     375    | ip2k-* | iq2000-* \
     376    | le32-* | le64-* \
     377    | lm32-* \
     378    | m32c-* | m32r-* | m32rle-* \
    307379    | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
    308     | m88110-* | m88k-* | mcore-* \
     380    | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
    309381    | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
    310382    | mips16-* \
    311383    | mips64-* | mips64el-* \
     384    | mips64octeon-* | mips64octeonel-* \
     385    | mips64orion-* | mips64orionel-* \
     386    | mips64r5900-* | mips64r5900el-* \
    312387    | mips64vr-* | mips64vrel-* \
    313     | mips64orion-* | mips64orionel-* \
    314388    | mips64vr4100-* | mips64vr4100el-* \
    315389    | mips64vr4300-* | mips64vr4300el-* \
    316390    | mips64vr5000-* | mips64vr5000el-* \
     391    | mips64vr5900-* | mips64vr5900el-* \
    317392    | mipsisa32-* | mipsisa32el-* \
     393    | mipsisa32r2-* | mipsisa32r2el-* \
    318394    | mipsisa64-* | mipsisa64el-* \
     395    | mipsisa64r2-* | mipsisa64r2el-* \
    319396    | mipsisa64sb1-* | mipsisa64sb1el-* \
    320397    | mipsisa64sr71k-* | mipsisa64sr71kel-* \
    321     | mipstx39 | mipstx39el \
     398    | mipstx39-* | mipstx39el-* \
     399    | mmix-* \
     400    | mt-* \
     401    | msp430-* \
     402    | nds32-* | nds32le-* | nds32be-* \
     403    | nios-* | nios2-* \
    322404    | none-* | np1-* | ns16k-* | ns32k-* \
     405    | open8-* \
    323406    | orion-* \
    324407    | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
    325     | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
     408    | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
    326409    | pyramid-* \
    327     | romp-* | rs6000-* \
    328     | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \
     410    | rl78-* | romp-* | rs6000-* | rx-* \
     411    | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
    329412    | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
    330     | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
    331     | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
    332     | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \
    333     | v850-* | v850e-* | vax-* \
     413    | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
     414    | sparclite-* \
     415    | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \
     416    | tahoe-* \
     417    | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
     418    | tile*-* \
     419    | tron-* \
     420    | ubicom32-* \
     421    | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
     422    | vax-* \
    334423    | we32k-* \
    335     | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
    336     | xtensa-* \
     424    | x86-* | x86_64-* | xc16x-* | xps100-* \
     425    | xstormy16-* | xtensa*-* \
    337426    | ymp-* \
    338     | z8k-*)
     427    | z8k-* | z80-*)
     428        ;;
     429    # Recognize the basic CPU types without company name, with glob match.
     430    xtensa*)
     431        basic_machine=$basic_machine-unknown
    339432        ;;
    340433    # Recognize the various machine names and aliases which stand
     
    354447        os=-udi
    355448        ;;
     449    abacus)
     450        basic_machine=abacus-unknown
     451        ;;
    356452    adobe68k)
    357453        basic_machine=m68010-adobe
     
    368464        os=-bsd
    369465        ;;
     466    amd64)
     467        basic_machine=x86_64-pc
     468        ;;
     469    amd64-*)
     470        basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
     471        ;;
    370472    amdahl)
    371473        basic_machine=580-amdahl
     
    391493        os=-bsd
    392494        ;;
     495    aros)
     496        basic_machine=i386-pc
     497        os=-aros
     498        ;;
    393499    aux)
    394500        basic_machine=m68k-apple
     
    399505        os=-dynix
    400506        ;;
     507    blackfin)
     508        basic_machine=bfin-unknown
     509        os=-linux
     510        ;;
     511    blackfin-*)
     512        basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
     513        os=-linux
     514        ;;
     515    bluegene*)
     516        basic_machine=powerpc-ibm
     517        os=-cnk
     518        ;;
     519    c54x-*)
     520        basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
     521        ;;
     522    c55x-*)
     523        basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
     524        ;;
     525    c6x-*)
     526        basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
     527        ;;
    401528    c90)
    402529        basic_machine=c90-cray
    403530        os=-unicos
    404531        ;;
     532    cegcc)
     533        basic_machine=arm-unknown
     534        os=-cegcc
     535        ;;
    405536    convex-c1)
    406537        basic_machine=c1-convex
     
    427558        os=-unicos
    428559        ;;
     560    craynv)
     561        basic_machine=craynv-cray
     562        os=-unicosmp
     563        ;;
     564    cr16 | cr16-*)
     565        basic_machine=cr16-unknown
     566        os=-elf
     567        ;;
    429568    crds | unos)
    430569        basic_machine=m68k-crds
    431570        ;;
     571    crisv32 | crisv32-* | etraxfs*)
     572        basic_machine=crisv32-axis
     573        ;;
    432574    cris | cris-* | etrax*)
    433575        basic_machine=cris-axis
     576        ;;
     577    crx)
     578        basic_machine=crx-unknown
     579        os=-elf
    434580        ;;
    435581    da30 | da30-*)
     
    454600        basic_machine=m88k-motorola
    455601        os=-sysv3
     602        ;;
     603    dicos)
     604        basic_machine=i686-pc
     605        os=-dicos
     606        ;;
     607    djgpp)
     608        basic_machine=i586-pc
     609        os=-msdosdjgpp
    456610        ;;
    457611    dpx20 | dpx20-*)
     
    605759        os=-sysv
    606760        ;;
     761    m68knommu)
     762        basic_machine=m68k-unknown
     763        os=-linux
     764        ;;
     765    m68knommu-*)
     766        basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
     767        os=-linux
     768        ;;
    607769    m88k-omron*)
    608770        basic_machine=m88k-omron
     
    616778        os=-sysv
    617779        ;;
     780    microblaze)
     781        basic_machine=microblaze-xilinx
     782        ;;
    618783    mingw32)
    619784        basic_machine=i386-pc
    620785        os=-mingw32
    621786        ;;
     787    mingw32ce)
     788        basic_machine=arm-unknown
     789        os=-mingw32ce
     790        ;;
    622791    miniframe)
    623792        basic_machine=m68000-convergent
     
    633802        basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
    634803        ;;
    635     mmix*)
    636         basic_machine=mmix-knuth
    637         os=-mmixware
    638         ;;
    639804    monitor)
    640805        basic_machine=m68k-rom68k
     
    649814        os=-msdos
    650815        ;;
     816    ms1-*)
     817        basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
     818        ;;
     819    msys)
     820        basic_machine=i386-pc
     821        os=-msys
     822        ;;
    651823    mvs)
    652824        basic_machine=i370-ibm
    653825        os=-mvs
     826        ;;
     827    nacl)
     828        basic_machine=le32-unknown
     829        os=-nacl
    654830        ;;
    655831    ncr3000)
     
    717893        basic_machine=np1-gould
    718894        ;;
     895    neo-tandem)
     896        basic_machine=neo-tandem
     897        ;;
     898    nse-tandem)
     899        basic_machine=nse-tandem
     900        ;;
    719901    nsr-tandem)
    720902        basic_machine=nsr-tandem
     
    724906        os=-proelf
    725907        ;;
    726     or32 | or32-*)
     908    openrisc | openrisc-*)
    727909        basic_machine=or32-unknown
    728         os=-coff
     910        ;;
     911    os400)
     912        basic_machine=powerpc-ibm
     913        os=-os400
    729914        ;;
    730915    OSE68000 | ose68000)
     
    744929        os=-osf
    745930        ;;
     931    parisc)
     932        basic_machine=hppa-unknown
     933        os=-linux
     934        ;;
     935    parisc-*)
     936        basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
     937        os=-linux
     938        ;;
    746939    pbd)
    747940        basic_machine=sparc-tti
     
    753946        basic_machine=ns32k-pc532
    754947        ;;
     948    pc98)
     949        basic_machine=i386-pc
     950        ;;
     951    pc98-*)
     952        basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
     953        ;;
    755954    pentium | p5 | k5 | k6 | nexgen | viac3)
    756955        basic_machine=i586-pc
     
    759958        basic_machine=i686-pc
    760959        ;;
    761     pentiumii | pentium2)
     960    pentiumii | pentium2 | pentiumiii | pentium3)
    762961        basic_machine=i686-pc
     962        ;;
     963    pentium4)
     964        basic_machine=i786-pc
    763965        ;;
    764966    pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
     
    768970        basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
    769971        ;;
    770     pentiumii-* | pentium2-*)
     972    pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
    771973        basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
     974        ;;
     975    pentium4-*)
     976        basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
    772977        ;;
    773978    pn)
     
    776981    power)  basic_machine=power-ibm
    777982        ;;
    778     ppc)    basic_machine=powerpc-unknown
    779         ;;
    780     ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
     983    ppc | ppcbe)    basic_machine=powerpc-unknown
     984        ;;
     985    ppc-* | ppcbe-*)
     986        basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
    781987        ;;
    782988    ppcle | powerpclittle | ppc-le | powerpc-little)
     
    8031009        os=-pw32
    8041010        ;;
     1011    rdos)
     1012        basic_machine=i386-pc
     1013        os=-rdos
     1014        ;;
    8051015    rom68k)
    8061016        basic_machine=m68k-rom68k
     
    8291039        basic_machine=mipsisa64sb1el-unknown
    8301040        ;;
     1041    sde)
     1042        basic_machine=mipsisa32-sde
     1043        os=-elf
     1044        ;;
     1045    sei)
     1046        basic_machine=mips-sei
     1047        os=-seiux
     1048        ;;
    8311049    sequent)
    8321050        basic_machine=i386-sequent
     
    8361054        os=-hms
    8371055        ;;
     1056    sh5el)
     1057        basic_machine=sh5le-unknown
     1058        ;;
     1059    sh64)
     1060        basic_machine=sh64-unknown
     1061        ;;
    8381062    sparclite-wrs | simso-wrs)
    8391063        basic_machine=sparclite-wrs
     
    8541078        os=-sysv4
    8551079        ;;
     1080    strongarm-* | thumb-*)
     1081        basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'`
     1082        ;;
    8561083    sun2)
    8571084        basic_machine=m68000-sun
     
    9021129        os=-dynix
    9031130        ;;
    904     t3d)
    905         basic_machine=alpha-cray
    906         os=-unicos
    907         ;;
    9081131    t3e)
    9091132        basic_machine=alphaev5-cray
     
    9141137        os=-unicos
    9151138        ;;
    916         tic4x | c4x*)
    917         basic_machine=tic4x-unknown
    918         os=-coff
    919         ;;
    920     tic54x | c54x*)
    921         basic_machine=tic54x-unknown
    922         os=-coff
     1139    tile*)
     1140        basic_machine=$basic_machine-unknown
     1141        os=-linux-gnu
    9231142        ;;
    9241143    tx39)
     
    9351154        basic_machine=m68k-ncr
    9361155        ;;
     1156    tpf)
     1157        basic_machine=s390x-ibm
     1158        os=-tpf
     1159        ;;
    9371160    udi29k)
    9381161        basic_machine=a29k-amd
     
    9781201        os=-proelf
    9791202        ;;
    980     windows32)
    981         basic_machine=i386-pc
    982         os=-windows32-msvcrt
     1203    xbox)
     1204        basic_machine=i686-pc
     1205        os=-mingw32
    9831206        ;;
    9841207    xps | xps100)
    9851208        basic_machine=xps100-honeywell
     1209        ;;
     1210    xscale-* | xscalee[bl]-*)
     1211        basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'`
    9861212        ;;
    9871213    ymp)
     
    9911217    z8k-*-coff)
    9921218        basic_machine=z8k-unknown
     1219        os=-sim
     1220        ;;
     1221    z80-*-coff)
     1222        basic_machine=z80-unknown
    9931223        os=-sim
    9941224        ;;
     
    10121242        basic_machine=romp-ibm
    10131243        ;;
     1244    mmix)
     1245        basic_machine=mmix-knuth
     1246        ;;
    10141247    rs6000)
    10151248        basic_machine=rs6000-ibm
     
    10281261        basic_machine=we32k-att
    10291262        ;;
    1030     sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele)
     1263    sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
    10311264        basic_machine=sh-unknown
    10321265        ;;
    1033     sh64)
    1034         basic_machine=sh64-unknown
    1035         ;;
    1036     sparc | sparcv9 | sparcv9b)
     1266    sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
    10371267        basic_machine=sparc-sun
    10381268        ;;
     
    10781308then
    10791309case $os in
    1080         # First match some system type aliases
    1081         # that might get confused with valid system types.
     1310    # First match some system type aliases
     1311    # that might get confused with valid system types.
    10821312    # -solaris* is a basic system type, with this one exception.
     1313    -auroraux)
     1314        os=-auroraux
     1315        ;;
    10831316    -solaris1 | -solaris1.*)
    10841317        os=`echo $os | sed -e 's|solaris1|sunos4|'`
     
    11011334    # -sysv* is not here because it comes later, after sysvr4.
    11021335    -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
    1103           | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
    1104           | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
     1336          | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
     1337          | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
     1338          | -sym* | -kopensolaris* \
    11051339          | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
    1106           | -aos* \
     1340          | -aos* | -aros* \
    11071341          | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
    11081342          | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
    1109           | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
    1110           | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
     1343          | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
     1344          | -openbsd* | -solidbsd* \
     1345          | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
     1346          | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
    11111347          | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
    11121348          | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
    1113           | -chorusos* | -chorusrdb* \
    1114           | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
    1115           | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
    1116           | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
     1349          | -chorusos* | -chorusrdb* | -cegcc* \
     1350          | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
     1351          | -mingw32* | -linux-gnu* | -linux-android* \
     1352          | -linux-newlib* | -linux-uclibc* \
     1353          | -uxpv* | -beos* | -mpeix* | -udk* \
     1354          | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
    11171355          | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
    11181356          | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
    11191357          | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
    1120           | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*)
     1358          | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
     1359          | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
     1360          | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
    11211361    # Remember, each alternative MUST END IN *, to match a version number.
    11221362        ;;
     
    11301370        esac
    11311371        ;;
     1372    -nto-qnx*)
     1373        ;;
    11321374    -nto*)
    1133         os=-nto-qnx
     1375        os=`echo $os | sed -e 's|nto|nto-qnx|'`
    11341376        ;;
    11351377    -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
    1136           | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
     1378          | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
    11371379          | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
    11381380        ;;
     
    11401382        os=`echo $os | sed -e 's|mac|macos|'`
    11411383        ;;
     1384    -linux-dietlibc)
     1385        os=-linux-dietlibc
     1386        ;;
    11421387    -linux*)
    11431388        os=`echo $os | sed -e 's|linux|linux-gnu|'`
     
    11521397        os=-openedition
    11531398        ;;
     1399    -os400*)
     1400        os=-os400
     1401        ;;
    11541402    -wince*)
    11551403        os=-wince
     
    11721420    -atheos*)
    11731421        os=-atheos
     1422        ;;
     1423    -syllable*)
     1424        os=-syllable
    11741425        ;;
    11751426    -386bsd)
     
    11951446        os=-sysv4
    11961447        ;;
     1448    -tpf*)
     1449        os=-tpf
     1450        ;;
    11971451    -triton*)
    11981452        os=-sysv3
     
    12241478    -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
    12251479        os=-mint
     1480        ;;
     1481    -aros*)
     1482        os=-aros
     1483        ;;
     1484    -kaos*)
     1485        os=-kaos
     1486        ;;
     1487    -zvmoe)
     1488        os=-zvmoe
     1489        ;;
     1490    -dicos*)
     1491        os=-dicos
     1492        ;;
     1493    -nacl*)
    12261494        ;;
    12271495    -none)
     
    12471515
    12481516case $basic_machine in
     1517    score-*)
     1518        os=-elf
     1519        ;;
     1520    spu-*)
     1521        os=-elf
     1522        ;;
    12491523    *-acorn)
    12501524        os=-riscix1.2
     
    12551529    arm*-semi)
    12561530        os=-aout
     1531        ;;
     1532    c4x-* | tic4x-*)
     1533        os=-coff
     1534        ;;
     1535    tic54x-*)
     1536        os=-coff
     1537        ;;
     1538    tic55x-*)
     1539        os=-coff
     1540        ;;
     1541    tic6x-*)
     1542        os=-coff
    12571543        ;;
    12581544    # This must come before the *-dec entry.
     
    12811567        os=-aout
    12821568        ;;
     1569    mep-*)
     1570        os=-elf
     1571        ;;
    12831572    mips*-cisco)
    12841573        os=-elf
     
    12991588        os=-beos
    13001589        ;;
     1590    *-haiku)
     1591        os=-haiku
     1592        ;;
    13011593    *-ibm)
    13021594        os=-aix
     1595        ;;
     1596    *-knuth)
     1597        os=-mmixware
    13031598        ;;
    13041599    *-wec)
     
    14041699                vendor=sun
    14051700                ;;
    1406             -aix*)
     1701            -cnk*|-aix*)
    14071702                vendor=ibm
    14081703                ;;
     
    14341729                vendor=ibm
    14351730                ;;
     1731            -os400*)
     1732                vendor=ibm
     1733                ;;
    14361734            -ptx*)
    14371735                vendor=sequent
    14381736                ;;
     1737            -tpf*)
     1738                vendor=ibm
     1739                ;;
    14391740            -vxsim* | -vxworks* | -windiss*)
    14401741                vendor=wrs
     
    14611762
    14621763echo $basic_machine$os
    1463 exit 0
     1764exit
    14641765
    14651766# Local variables:
Note: See TracChangeset for help on using the changeset viewer.