Changeset 378 for trunk


Ignore:
Timestamp:
Nov 28, 2011, 9:09:36 PM (13 years ago)
Author:
katerina
Message:

Fix for tickets #273 (deadlock), #274 (compile errors), #275 (makefile), #276 (config.sub, config.guess).

Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Makefile.in

    r367 r378  
    11511151        ./encode $(XOR_CODE) $(srcsrc)/`echo $@ |sed 's%\.o$$%%'`.c; \
    11521152        echo "$(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $@ |sed 's%\.o$$%%'`.c"; \
    1153         $(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $@ |sed 's%\.o$$%%'`.c; \
     1153        $(COMPILE) $(VFLAG) -o `echo $@ |sed 's%.*/%%'` -c x_`echo $@ |sed 's%\.o$$%%'`.c && \
    11541154        rm x_`echo $@ |sed 's%\.o$$%%'`.c
    11551155
  • trunk/aclocal.m4

    r350 r378  
    13441344          $CC -E -dM - < /dev/null | egrep '__i386__' >/dev/null 2>&1
    13451345          if test $? = 0; then
    1346             # apples gcc does not understand the assembly we provide
    1347             $CC -E -dM - < /dev/null | egrep '(__sun__|__APPLE__|__CYGWIN__)' >/dev/null 2>&1 || samhain_i386=yes
     1346            case "$host_os" in
     1347                 *linux*)
     1348                 # apples gcc does not understand the assembly we provide
     1349                 $CC -E -dM - < /dev/null | egrep '(__sun__|__APPLE__|__CYGWIN__)' >/dev/null 2>&1 || samhain_i386=yes
     1350                 ;;
     1351                 *)
     1352                 ;;
     1353            esac
    13481354          fi
    13491355          AC_MSG_RESULT([$samhain_i386])
  • trunk/config.guess

    r1 r378  
    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-10-21'
     4#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
     5#   Free Software Foundation, Inc.
     6
     7timestamp='2009-12-30'
    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 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 ;
     
    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).
     
    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 -o $dummy $dummy.s 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        exit ;;
    292274    Alpha\ *:Windows_NT*:*)
    293275        # How do we know it's Interix rather than the generic POSIX subsystem?
     
    295277        # of the specific Alpha model?
    296278        echo alpha-pc-interix
    297         exit 0 ;;
     279        exit ;;
    298280    21064:Windows_NT:50:3)
    299281        echo alpha-dec-winnt3.5
    300         exit 0 ;;
     282        exit ;;
    301283    Amiga*:UNIX_System_V:4.0:*)
    302284        echo m68k-unknown-sysv4
    303         exit 0;;
     285        exit ;;
    304286    *:[Aa]miga[Oo][Ss]:*:*)
    305287        echo ${UNAME_MACHINE}-unknown-amigaos
    306         exit 0 ;;
     288        exit ;;
    307289    *:[Mm]orph[Oo][Ss]:*:*)
    308290        echo ${UNAME_MACHINE}-unknown-morphos
    309         exit 0 ;;
     291        exit ;;
    310292    *:OS/390:*:*)
    311293        echo i370-ibm-openedition
    312         exit 0 ;;
     294        exit ;;
     295    *:z/VM:*:*)
     296        echo s390-ibm-zvmoe
     297        exit ;;
     298    *:OS400:*:*)
     299        echo powerpc-ibm-os400
     300        exit ;;
    313301    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
    314302        echo arm-acorn-riscix${UNAME_RELEASE}
    315         exit 0;;
     303        exit ;;
     304    arm:riscos:*:*|arm:RISCOS:*:*)
     305        echo arm-unknown-riscos
     306        exit ;;
    316307    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
    317308        echo hppa1.1-hitachi-hiuxmpp
    318         exit 0;;
     309        exit ;;
    319310    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
    320311        # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
     
    324315                echo pyramid-pyramid-bsd
    325316        fi
    326         exit 0 ;;
     317        exit ;;
    327318    NILE*:*:*:dcosx)
    328319        echo pyramid-pyramid-svr4
    329         exit 0 ;;
    330     DRS?6000:UNIX_SV:4.2*:7*)
     320        exit ;;
     321    DRS?6000:unix:4.0:6*)
     322        echo sparc-icl-nx6
     323        exit ;;
     324    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
    331325        case `/usr/bin/uname -p` in
    332             sparc) echo sparc-icl-nx7 && exit 0 ;;
     326            sparc) echo sparc-icl-nx7; exit ;;
    333327        esac ;;
     328    s390x:SunOS:*:*)
     329        echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
     330        exit ;;
    334331    sun4H:SunOS:5.*:*)
    335332        echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    336         exit 0 ;;
     333        exit ;;
    337334    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
    338335        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 ;;
     336        exit ;;
     337    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
     338        echo i386-pc-auroraux${UNAME_RELEASE}
     339        exit ;;
     340    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
     341        eval $set_cc_for_build
     342        SUN_ARCH="i386"
     343        # If there is a compiler, see if it is configured for 64-bit objects.
     344        # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
     345        # This test works for both compilers.
     346        if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
     347            if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
     348                (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
     349                grep IS_64BIT_ARCH >/dev/null
     350            then
     351                SUN_ARCH="x86_64"
     352            fi
     353        fi
     354        echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
     355        exit ;;
    343356    sun4*:SunOS:6*:*)
    344357        # According to config.sub, this is the proper way to canonicalize
     
    346359        # it's likely to be more like Solaris than SunOS4.
    347360        echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    348         exit 0 ;;
     361        exit ;;
    349362    sun4*:SunOS:*:*)
    350363        case "`/usr/bin/arch -k`" in
     
    355368        # Japanese Language versions have a version number like `4.1.3-JL'.
    356369        echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
    357         exit 0 ;;
     370        exit ;;
    358371    sun3*:SunOS:*:*)
    359372        echo m68k-sun-sunos${UNAME_RELEASE}
    360         exit 0 ;;
     373        exit ;;
    361374    sun*:*:4.2BSD:*)
    362375        UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
     
    370383                ;;
    371384        esac
    372         exit 0 ;;
     385        exit ;;
    373386    aushp:SunOS:*:*)
    374387        echo sparc-auspex-sunos${UNAME_RELEASE}
    375         exit 0 ;;
     388        exit ;;
    376389    # The situation for MiNT is a little confusing.  The machine name
    377390    # can be virtually everything (everything which is not
     
    384397    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
    385398        echo m68k-atari-mint${UNAME_RELEASE}
    386         exit 0 ;;
     399        exit ;;
    387400    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
    388401        echo m68k-atari-mint${UNAME_RELEASE}
    389         exit 0 ;;
     402        exit ;;
    390403    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
    391404        echo m68k-atari-mint${UNAME_RELEASE}
    392         exit 0 ;;
     405        exit ;;
    393406    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
    394407        echo m68k-milan-mint${UNAME_RELEASE}
    395         exit 0 ;;
     408        exit ;;
    396409    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
    397410        echo m68k-hades-mint${UNAME_RELEASE}
    398         exit 0 ;;
     411        exit ;;
    399412    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
    400413        echo m68k-unknown-mint${UNAME_RELEASE}
    401         exit 0 ;;
     414        exit ;;
     415    m68k:machten:*:*)
     416        echo m68k-apple-machten${UNAME_RELEASE}
     417        exit ;;
    402418    powerpc:machten:*:*)
    403419        echo powerpc-apple-machten${UNAME_RELEASE}
    404         exit 0 ;;
     420        exit ;;
    405421    RISC*:Mach:*:*)
    406422        echo mips-dec-mach_bsd4.3
    407         exit 0 ;;
     423        exit ;;
    408424    RISC*:ULTRIX:*:*)
    409425        echo mips-dec-ultrix${UNAME_RELEASE}
    410         exit 0 ;;
     426        exit ;;
    411427    VAX*:ULTRIX*:*:*)
    412428        echo vax-dec-ultrix${UNAME_RELEASE}
    413         exit 0 ;;
     429        exit ;;
    414430    2020:CLIX:*:* | 2430:CLIX:*:*)
    415431        echo clipper-intergraph-clix${UNAME_RELEASE}
    416         exit 0 ;;
     432        exit ;;
    417433    mips:*:*:UMIPS | mips:*:*:RISCos)
    418434        eval $set_cc_for_build
     
    438454        }
    439455EOF
    440         $CC_FOR_BUILD -o $dummy $dummy.c \
    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
     456        $CC_FOR_BUILD -o $dummy $dummy.c &&
     457          dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
     458          SYSTEM_NAME=`$dummy $dummyarg` &&
     459            { echo "$SYSTEM_NAME"; exit; }
    444460        echo mips-mips-riscos${UNAME_RELEASE}
    445         exit 0 ;;
     461        exit ;;
    446462    Motorola:PowerMAX_OS:*:*)
    447463        echo powerpc-motorola-powermax
    448         exit 0 ;;
     464        exit ;;
    449465    Motorola:*:4.3:PL8-*)
    450466        echo powerpc-harris-powermax
    451         exit 0 ;;
    452     Night_Hawk:*:*:PowerMAX_OS)
     467        exit ;;
     468    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
    453469        echo powerpc-harris-powermax
    454         exit 0 ;;
     470        exit ;;
    455471    Night_Hawk:Power_UNIX:*:*)
    456472        echo powerpc-harris-powerunix
    457         exit 0 ;;
     473        exit ;;
    458474    m88k:CX/UX:7*:*)
    459475        echo m88k-harris-cxux7
    460         exit 0 ;;
     476        exit ;;
    461477    m88k:*:4*:R4*)
    462478        echo m88k-motorola-sysv4
    463         exit 0 ;;
     479        exit ;;
    464480    m88k:*:3*:R3*)
    465481        echo m88k-motorola-sysv3
    466         exit 0 ;;
     482        exit ;;
    467483    AViiON:dgux:*:*)
    468484        # DG/UX returns AViiON for all architectures
     
    480496            echo i586-dg-dgux${UNAME_RELEASE}
    481497        fi
    482         exit 0 ;;
     498        exit ;;
    483499    M88*:DolphinOS:*:*) # DolphinOS (SVR3)
    484500        echo m88k-dolphin-sysv3
    485         exit 0 ;;
     501        exit ;;
    486502    M88*:*:R3*:*)
    487503        # Delta 88k system running SVR3
    488504        echo m88k-motorola-sysv3
    489         exit 0 ;;
     505        exit ;;
    490506    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
    491507        echo m88k-tektronix-sysv3
    492         exit 0 ;;
     508        exit ;;
    493509    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
    494510        echo m68k-tektronix-bsd
    495         exit 0 ;;
     511        exit ;;
    496512    *:IRIX*:*:*)
    497513        echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
    498         exit 0 ;;
     514        exit ;;
    499515    ????????: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 '
     516        echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id
     517        exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX '
    502518    i*86:AIX:*:*)
    503519        echo i386-ibm-aix
    504         exit 0 ;;
     520        exit ;;
    505521    ia64:AIX:*:*)
    506522        if [ -x /usr/bin/oslevel ] ; then
     
    510526        fi
    511527        echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
    512         exit 0 ;;
     528        exit ;;
    513529    *:AIX:2:3)
    514530        if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
     
    525541                        }
    526542EOF
    527                 $CC_FOR_BUILD -o $dummy $dummy.c && $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
     543                if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
     544                then
     545                        echo "$SYSTEM_NAME"
     546                else
     547                        echo rs6000-ibm-aix3.2.5
     548                fi
    530549        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
    531550                echo rs6000-ibm-aix3.2.4
     
    533552                echo rs6000-ibm-aix3.2
    534553        fi
    535         exit 0 ;;
    536     *:AIX:*:[45])
     554        exit ;;
     555    *:AIX:*:[456])
    537556        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
    538557        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
     
    547566        fi
    548567        echo ${IBM_ARCH}-ibm-aix${IBM_REV}
    549         exit 0 ;;
     568        exit ;;
    550569    *:AIX:*:*)
    551570        echo rs6000-ibm-aix
    552         exit 0 ;;
     571        exit ;;
    553572    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
    554573        echo romp-ibm-bsd4.4
    555         exit 0 ;;
     574        exit ;;
    556575    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
    557576        echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
    558         exit 0 ;;                           # report: romp-ibm BSD 4.3
     577        exit ;;                             # report: romp-ibm BSD 4.3
    559578    *:BOSX:*:*)
    560579        echo rs6000-bull-bosx
    561         exit 0 ;;
     580        exit ;;
    562581    DPX/2?00:B.O.S.:*:*)
    563582        echo m68k-bull-sysv3
    564         exit 0 ;;
     583        exit ;;
    565584    9000/[34]??:4.3bsd:1.*:*)
    566585        echo m68k-hp-bsd
    567         exit 0 ;;
     586        exit ;;
    568587    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
    569588        echo m68k-hp-bsd4.4
    570         exit 0 ;;
     589        exit ;;
    571590    9000/[34678]??:HP-UX:*:*)
    572591        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
     
    625644EOF
    626645                    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 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
     646                    test -z "$HP_ARCH" && HP_ARCH=hppa
    629647                fi ;;
    630648        esac
     649        if [ ${HP_ARCH} = "hppa2.0w" ]
     650        then
     651            eval $set_cc_for_build
     652
     653            # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
     654            # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler
     655            # generating 64-bit code.  GNU and HP use different nomenclature:
     656            #
     657            # $ CC_FOR_BUILD=cc ./config.guess
     658            # => hppa2.0w-hp-hpux11.23
     659            # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
     660            # => hppa64-hp-hpux11.23
     661
     662            if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
     663                grep -q __LP64__
     664            then
     665                HP_ARCH="hppa2.0w"
     666            else
     667                HP_ARCH="hppa64"
     668            fi
     669        fi
    631670        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
    632         exit 0 ;;
     671        exit ;;
    633672    ia64:HP-UX:*:*)
    634673        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
    635674        echo ia64-hp-hpux${HPUX_REV}
    636         exit 0 ;;
     675        exit ;;
    637676    3050*:HI-UX:*:*)
    638677        eval $set_cc_for_build
     
    662701        }
    663702EOF
    664         $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
    665         rm -f $dummy.c $dummy && rmdir $tmpdir
     703        $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
     704                { echo "$SYSTEM_NAME"; exit; }
    666705        echo unknown-hitachi-hiuxwe2
    667         exit 0 ;;
     706        exit ;;
    668707    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
    669708        echo hppa1.1-hp-bsd
    670         exit 0 ;;
     709        exit ;;
    671710    9000/8??:4.3bsd:*:*)
    672711        echo hppa1.0-hp-bsd
    673         exit 0 ;;
     712        exit ;;
    674713    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
    675714        echo hppa1.0-hp-mpeix
    676         exit 0 ;;
     715        exit ;;
    677716    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
    678717        echo hppa1.1-hp-osf
    679         exit 0 ;;
     718        exit ;;
    680719    hp8??:OSF1:*:*)
    681720        echo hppa1.0-hp-osf
    682         exit 0 ;;
     721        exit ;;
    683722    i*86:OSF1:*:*)
    684723        if [ -x /usr/sbin/sysversion ] ; then
     
    687726            echo ${UNAME_MACHINE}-unknown-osf1
    688727        fi
    689         exit 0 ;;
     728        exit ;;
    690729    parisc*:Lites*:*:*)
    691730        echo hppa1.1-hp-lites
    692         exit 0 ;;
     731        exit ;;
    693732    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
    694733        echo c1-convex-bsd
    695         exit 0 ;;
     734        exit ;;
    696735    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
    697736        if getsysinfo -f scalar_acc
     
    699738        else echo c2-convex-bsd
    700739        fi
    701         exit 0 ;;
     740        exit ;;
    702741    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
    703742        echo c34-convex-bsd
    704         exit 0 ;;
     743        exit ;;
    705744    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
    706745        echo c38-convex-bsd
    707         exit 0 ;;
     746        exit ;;
    708747    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
    709748        echo c4-convex-bsd
    710         exit 0 ;;
     749        exit ;;
    711750    CRAY*Y-MP:*:*:*)
    712751        echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    713         exit 0 ;;
     752        exit ;;
    714753    CRAY*[A-Z]90:*:*:*)
    715754        echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
     
    717756              -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
    718757              -e 's/\.[^.]*$/.X/'
    719         exit 0 ;;
     758        exit ;;
    720759    CRAY*TS:*:*:*)
    721760        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 ;;
     761        exit ;;
    726762    CRAY*T3E:*:*:*)
    727763        echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    728         exit 0 ;;
     764        exit ;;
    729765    CRAY*SV1:*:*:*)
    730766        echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    731         exit 0 ;;
     767        exit ;;
     768    *:UNICOS/mp:*:*)
     769        echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     770        exit ;;
    732771    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
    733772        FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
     
    735774        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
    736775        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
    737         exit 0 ;;
     776        exit ;;
     777    5000:UNIX_System_V:4.*:*)
     778        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
     779        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
     780        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
     781        exit ;;
    738782    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
    739783        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
    740         exit 0 ;;
     784        exit ;;
    741785    sparc*:BSD/OS:*:*)
    742786        echo sparc-unknown-bsdi${UNAME_RELEASE}
    743         exit 0 ;;
     787        exit ;;
    744788    *:BSD/OS:*:*)
    745789        echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
    746         exit 0 ;;
     790        exit ;;
    747791    *: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 ;;
     792        case ${UNAME_MACHINE} in
     793            pc98)
     794                echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
     795            amd64)
     796                echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
     797            *)
     798                echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
     799        esac
     800        exit ;;
    762801    i*:CYGWIN*:*)
    763802        echo ${UNAME_MACHINE}-pc-cygwin
    764         exit 0 ;;
    765     i*:MINGW*:*)
     803        exit ;;
     804    *:MINGW*:*)
    766805        echo ${UNAME_MACHINE}-pc-mingw32
    767         exit 0 ;;
     806        exit ;;
     807    i*:windows32*:*)
     808        # uname -m includes "-pc" on this system.
     809        echo ${UNAME_MACHINE}-mingw32
     810        exit ;;
    768811    i*:PW*:*)
    769812        echo ${UNAME_MACHINE}-pc-pw32
    770         exit 0 ;;
    771     x86:Interix*:3*)
    772         echo i386-pc-interix3
    773         exit 0 ;;
     813        exit ;;
     814    *:Interix*:*)
     815        case ${UNAME_MACHINE} in
     816            x86)
     817                echo i586-pc-interix${UNAME_RELEASE}
     818                exit ;;
     819            authenticamd | genuineintel | EM64T)
     820                echo x86_64-unknown-interix${UNAME_RELEASE}
     821                exit ;;
     822            IA64)
     823                echo ia64-unknown-interix${UNAME_RELEASE}
     824                exit ;;
     825        esac ;;
     826    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
     827        echo i${UNAME_MACHINE}-pc-mks
     828        exit ;;
     829    8664:Windows_NT:*)
     830        echo x86_64-pc-mks
     831        exit ;;
    774832    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
    775833        # How do we know it's Interix rather than the generic POSIX subsystem?
    776834        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
    777835        # UNAME_MACHINE based on the output of uname instead of i386?
    778         echo i386-pc-interix
    779         exit 0 ;;
     836        echo i586-pc-interix
     837        exit ;;
    780838    i*:UWIN*:*)
    781839        echo ${UNAME_MACHINE}-pc-uwin
    782         exit 0 ;;
     840        exit ;;
     841    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
     842        echo x86_64-unknown-cygwin
     843        exit ;;
    783844    p*:CYGWIN*:*)
    784845        echo powerpcle-unknown-cygwin
    785         exit 0 ;;
     846        exit ;;
    786847    prep*:SunOS:5.*:*)
    787848        echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
    788         exit 0 ;;
     849        exit ;;
    789850    *:GNU:*:*)
     851        # the GNU system
    790852        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
    791         exit 0 ;;
     853        exit ;;
     854    *:GNU/*:*:*)
     855        # other systems with GNU libc and userland
     856        echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
     857        exit ;;
    792858    i*86:Minix:*:*)
    793859        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 ;;
     860        exit ;;
    830861    alpha:Linux:*:*)
    831862        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
     
    838869          EV68*) UNAME_MACHINE=alphaev68 ;;
    839870        esac
    840         objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
     871        objdump --private-headers /bin/sh | grep -q ld.so.1
    841872        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
    842873        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
    843         exit 0 ;;
     874        exit ;;
     875    arm*:Linux:*:*)
     876        eval $set_cc_for_build
     877        if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
     878            | grep -q __ARM_EABI__
     879        then
     880            echo ${UNAME_MACHINE}-unknown-linux-gnu
     881        else
     882            echo ${UNAME_MACHINE}-unknown-linux-gnueabi
     883        fi
     884        exit ;;
     885    avr32*:Linux:*:*)
     886        echo ${UNAME_MACHINE}-unknown-linux-gnu
     887        exit ;;
     888    cris:Linux:*:*)
     889        echo cris-axis-linux-gnu
     890        exit ;;
     891    crisv32:Linux:*:*)
     892        echo crisv32-axis-linux-gnu
     893        exit ;;
     894    frv:Linux:*:*)
     895        echo frv-unknown-linux-gnu
     896        exit ;;
     897    i*86:Linux:*:*)
     898        LIBC=gnu
     899        eval $set_cc_for_build
     900        sed 's/^        //' << EOF >$dummy.c
     901        #ifdef __dietlibc__
     902        LIBC=dietlibc
     903        #endif
     904EOF
     905        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
     906        echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
     907        exit ;;
     908    ia64:Linux:*:*)
     909        echo ${UNAME_MACHINE}-unknown-linux-gnu
     910        exit ;;
     911    m32r*:Linux:*:*)
     912        echo ${UNAME_MACHINE}-unknown-linux-gnu
     913        exit ;;
     914    m68*:Linux:*:*)
     915        echo ${UNAME_MACHINE}-unknown-linux-gnu
     916        exit ;;
     917    mips:Linux:*:* | mips64:Linux:*:*)
     918        eval $set_cc_for_build
     919        sed 's/^        //' << EOF >$dummy.c
     920        #undef CPU
     921        #undef ${UNAME_MACHINE}
     922        #undef ${UNAME_MACHINE}el
     923        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
     924        CPU=${UNAME_MACHINE}el
     925        #else
     926        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
     927        CPU=${UNAME_MACHINE}
     928        #else
     929        CPU=
     930        #endif
     931        #endif
     932EOF
     933        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
     934        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
     935        ;;
     936    or32:Linux:*:*)
     937        echo or32-unknown-linux-gnu
     938        exit ;;
     939    padre:Linux:*:*)
     940        echo sparc-unknown-linux-gnu
     941        exit ;;
     942    parisc64:Linux:*:* | hppa64:Linux:*:*)
     943        echo hppa64-unknown-linux-gnu
     944        exit ;;
    844945    parisc:Linux:*:* | hppa:Linux:*:*)
    845946        # Look for CPU level
     
    849950          *)    echo hppa-unknown-linux-gnu ;;
    850951        esac
    851         exit 0 ;;
    852     parisc64:Linux:*:* | hppa64:Linux:*:*)
    853         echo hppa64-unknown-linux-gnu
    854         exit 0 ;;
     952        exit ;;
     953    ppc64:Linux:*:*)
     954        echo powerpc64-unknown-linux-gnu
     955        exit ;;
     956    ppc:Linux:*:*)
     957        echo powerpc-unknown-linux-gnu
     958        exit ;;
    855959    s390:Linux:*:* | s390x:Linux:*:*)
    856960        echo ${UNAME_MACHINE}-ibm-linux
    857         exit 0 ;;
     961        exit ;;
     962    sh64*:Linux:*:*)
     963        echo ${UNAME_MACHINE}-unknown-linux-gnu
     964        exit ;;
    858965    sh*:Linux:*:*)
    859966        echo ${UNAME_MACHINE}-unknown-linux-gnu
    860         exit 0 ;;
     967        exit ;;
    861968    sparc:Linux:*:* | sparc64:Linux:*:*)
    862969        echo ${UNAME_MACHINE}-unknown-linux-gnu
    863         exit 0 ;;
     970        exit ;;
     971    vax:Linux:*:*)
     972        echo ${UNAME_MACHINE}-dec-linux-gnu
     973        exit ;;
    864974    x86_64:Linux:*:*)
    865975        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         ;;
     976        exit ;;
     977    xtensa*:Linux:*:*)
     978        echo ${UNAME_MACHINE}-unknown-linux-gnu
     979        exit ;;
    921980    i*86:DYNIX/ptx:4*:*)
    922981        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
     
    924983        # sysname and nodename.
    925984        echo i386-sequent-sysv4
    926         exit 0 ;;
     985        exit ;;
    927986    i*86:UNIX_SV:4.2MP:2.*)
    928987        # Unixware is an offshoot of SVR4, but it has its own version
     
    932991        # Use sysv4.2uw... so that sysv4* matches it.
    933992        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
    934         exit 0 ;;
     993        exit ;;
     994    i*86:OS/2:*:*)
     995        # If we were able to find `uname', then EMX Unix compatibility
     996        # is probably installed.
     997        echo ${UNAME_MACHINE}-pc-os2-emx
     998        exit ;;
     999    i*86:XTS-300:*:STOP)
     1000        echo ${UNAME_MACHINE}-unknown-stop
     1001        exit ;;
     1002    i*86:atheos:*:*)
     1003        echo ${UNAME_MACHINE}-unknown-atheos
     1004        exit ;;
     1005    i*86:syllable:*:*)
     1006        echo ${UNAME_MACHINE}-pc-syllable
     1007        exit ;;
     1008    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
     1009        echo i386-unknown-lynxos${UNAME_RELEASE}
     1010        exit ;;
     1011    i*86:*DOS:*:*)
     1012        echo ${UNAME_MACHINE}-pc-msdosdjgpp
     1013        exit ;;
    9351014    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
    9361015        UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
     
    9401019                echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
    9411020        fi
    942         exit 0 ;;
    943     i*86:*:5:[78]*)
     1021        exit ;;
     1022    i*86:*:5:[678]*)
     1023        # UnixWare 7.x, OpenUNIX and OpenServer 6.
    9441024        case `/bin/uname -X | grep "^Machine"` in
    9451025            *486*)           UNAME_MACHINE=i486 ;;
     
    9481028        esac
    9491029        echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
    950         exit 0 ;;
     1030        exit ;;
    9511031    i*86:*:3.2:*)
    9521032        if test -f /usr/options/cb.name; then
     
    9661046                echo ${UNAME_MACHINE}-pc-sysv32
    9671047        fi
    968         exit 0 ;;
    969     i*86:*DOS:*:*)
    970         echo ${UNAME_MACHINE}-pc-msdosdjgpp
    971         exit 0 ;;
     1048        exit ;;
    9721049    pc:*:*:*)
    9731050        # Left here for compatibility:
    9741051        # 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 ;;
     1052        # the processor, so we play safe by assuming i586.
     1053        # Note: whatever this is, it MUST be the same as what config.sub
     1054        # prints for the "djgpp" host, or else GDB configury will decide that
     1055        # this is a cross-build.
     1056        echo i586-pc-msdosdjgpp
     1057        exit ;;
    9781058    Intel:Mach:3*:*)
    9791059        echo i386-pc-mach3
    980         exit 0 ;;
     1060        exit ;;
    9811061    paragon:*:*:*)
    9821062        echo i860-intel-osf1
    983         exit 0 ;;
     1063        exit ;;
    9841064    i860:*:4.*:*) # i860-SVR4
    9851065        if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
     
    9881068          echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
    9891069        fi
    990         exit 0 ;;
     1070        exit ;;
    9911071    mini*:CTIX:SYS*5:*)
    9921072        # "miniframe"
    9931073        echo m68010-convergent-sysv
    994         exit 0 ;;
     1074        exit ;;
    9951075    mc68k:UNIX:SYSTEM5:3.51m)
    9961076        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)
     1077        exit ;;
     1078    M680?0:D-NIX:5.3:*)
     1079        echo m68k-diab-dnix
     1080        exit ;;
     1081    M68*:*:R3V[5678]*:*)
     1082        test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
     1083    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)
    10011084        OS_REL=''
    10021085        test -r /etc/.relid \
    10031086        && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
    10041087        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
    1005           && echo i486-ncr-sysv4.3${OS_REL} && exit 0
     1088          && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
    10061089        /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
    1007           && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
     1090          && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
    10081091    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
    10091092        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
    1010           && echo i486-ncr-sysv4 && exit 0 ;;
     1093          && { echo i486-ncr-sysv4; exit; } ;;
     1094    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
     1095        OS_REL='.3'
     1096        test -r /etc/.relid \
     1097            && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
     1098        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
     1099            && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
     1100        /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
     1101            && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
     1102        /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
     1103            && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
    10111104    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
    10121105        echo m68k-unknown-lynxos${UNAME_RELEASE}
    1013         exit 0 ;;
     1106        exit ;;
    10141107    mc68030:UNIX_System_V:4.*:*)
    10151108        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 ;;
     1109        exit ;;
    10201110    TSUNAMI:LynxOS:2.*:*)
    10211111        echo sparc-unknown-lynxos${UNAME_RELEASE}
    1022         exit 0 ;;
     1112        exit ;;
    10231113    rs6000:LynxOS:2.*:*)
    10241114        echo rs6000-unknown-lynxos${UNAME_RELEASE}
    1025         exit 0 ;;
    1026     PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
     1115        exit ;;
     1116    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
    10271117        echo powerpc-unknown-lynxos${UNAME_RELEASE}
    1028         exit 0 ;;
     1118        exit ;;
    10291119    SM[BE]S:UNIX_SV:*:*)
    10301120        echo mips-dde-sysv${UNAME_RELEASE}
    1031         exit 0 ;;
     1121        exit ;;
    10321122    RM*:ReliantUNIX-*:*:*)
    10331123        echo mips-sni-sysv4
    1034         exit 0 ;;
     1124        exit ;;
    10351125    RM*:SINIX-*:*:*)
    10361126        echo mips-sni-sysv4
    1037         exit 0 ;;
     1127        exit ;;
    10381128    *:SINIX-*:*:*)
    10391129        if uname -p 2>/dev/null >/dev/null ; then
     
    10431133                echo ns32k-sni-sysv
    10441134        fi
    1045         exit 0 ;;
     1135        exit ;;
    10461136    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
    10471137                      # says <Richard.M.Bartel@ccMail.Census.GOV>
    10481138        echo i586-unisys-sysv4
    1049         exit 0 ;;
     1139        exit ;;
    10501140    *:UNIX_System_V:4*:FTX*)
    10511141        # From Gerald Hewes <hewes@openmarket.com>.
    10521142        # How about differentiating between stratus architectures? -djm
    10531143        echo hppa1.1-stratus-sysv4
    1054         exit 0 ;;
     1144        exit ;;
    10551145    *:*:*:FTX*)
    10561146        # From seanf@swdc.stratus.com.
    10571147        echo i860-stratus-sysv4
    1058         exit 0 ;;
     1148        exit ;;
     1149    i*86:VOS:*:*)
     1150        # From Paul.Green@stratus.com.
     1151        echo ${UNAME_MACHINE}-stratus-vos
     1152        exit ;;
    10591153    *:VOS:*:*)
    10601154        # From Paul.Green@stratus.com.
    10611155        echo hppa1.1-stratus-vos
    1062         exit 0 ;;
     1156        exit ;;
    10631157    mc68*:A/UX:*:*)
    10641158        echo m68k-apple-aux${UNAME_RELEASE}
    1065         exit 0 ;;
     1159        exit ;;
    10661160    news*:NEWS-OS:6*:*)
    10671161        echo mips-sony-newsos6
    1068         exit 0 ;;
     1162        exit ;;
    10691163    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
    10701164        if [ -d /usr/nec ]; then
     
    10731167                echo mips-unknown-sysv${UNAME_RELEASE}
    10741168        fi
    1075         exit 0 ;;
     1169        exit ;;
    10761170    BeBox:BeOS:*:*)     # BeOS running on hardware made by Be, PPC only.
    10771171        echo powerpc-be-beos
    1078         exit 0 ;;
     1172        exit ;;
    10791173    BeMac:BeOS:*:*)     # BeOS running on Mac or Mac clone, PPC only.
    10801174        echo powerpc-apple-beos
    1081         exit 0 ;;
     1175        exit ;;
    10821176    BePC:BeOS:*:*)      # BeOS running on Intel PC compatible.
    10831177        echo i586-pc-beos
    1084         exit 0 ;;
     1178        exit ;;
     1179    BePC:Haiku:*:*)     # Haiku running on Intel PC compatible.
     1180        echo i586-pc-haiku
     1181        exit ;;
    10851182    SX-4:SUPER-UX:*:*)
    10861183        echo sx4-nec-superux${UNAME_RELEASE}
    1087         exit 0 ;;
     1184        exit ;;
    10881185    SX-5:SUPER-UX:*:*)
    10891186        echo sx5-nec-superux${UNAME_RELEASE}
    1090         exit 0 ;;
     1187        exit ;;
    10911188    SX-6:SUPER-UX:*:*)
    10921189        echo sx6-nec-superux${UNAME_RELEASE}
    1093         exit 0 ;;
     1190        exit ;;
     1191    SX-7:SUPER-UX:*:*)
     1192        echo sx7-nec-superux${UNAME_RELEASE}
     1193        exit ;;
     1194    SX-8:SUPER-UX:*:*)
     1195        echo sx8-nec-superux${UNAME_RELEASE}
     1196        exit ;;
     1197    SX-8R:SUPER-UX:*:*)
     1198        echo sx8r-nec-superux${UNAME_RELEASE}
     1199        exit ;;
    10941200    Power*:Rhapsody:*:*)
    10951201        echo powerpc-apple-rhapsody${UNAME_RELEASE}
    1096         exit 0 ;;
     1202        exit ;;
    10971203    *:Rhapsody:*:*)
    10981204        echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
    1099         exit 0 ;;
     1205        exit ;;
    11001206    *:Darwin:*:*)
    1101         echo `uname -p`-apple-darwin${UNAME_RELEASE}
    1102         exit 0 ;;
     1207        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
     1208        case $UNAME_PROCESSOR in
     1209            i386)
     1210                eval $set_cc_for_build
     1211                if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
     1212                  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
     1213                      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
     1214                      grep IS_64BIT_ARCH >/dev/null
     1215                  then
     1216                      UNAME_PROCESSOR="x86_64"
     1217                  fi
     1218                fi ;;
     1219            unknown) UNAME_PROCESSOR=powerpc ;;
     1220        esac
     1221        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
     1222        exit ;;
    11031223    *:procnto*:*:* | *:QNX:[0123456789]*:*)
    11041224        UNAME_PROCESSOR=`uname -p`
     
    11081228        fi
    11091229        echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
    1110         exit 0 ;;
     1230        exit ;;
    11111231    *:QNX:*:4*)
    11121232        echo i386-pc-qnx
    1113         exit 0 ;;
    1114     NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
     1233        exit ;;
     1234    NSE-?:NONSTOP_KERNEL:*:*)
     1235        echo nse-tandem-nsk${UNAME_RELEASE}
     1236        exit ;;
     1237    NSR-?:NONSTOP_KERNEL:*:*)
    11151238        echo nsr-tandem-nsk${UNAME_RELEASE}
    1116         exit 0 ;;
     1239        exit ;;
    11171240    *:NonStop-UX:*:*)
    11181241        echo mips-compaq-nonstopux
    1119         exit 0 ;;
     1242        exit ;;
    11201243    BS2000:POSIX*:*:*)
    11211244        echo bs2000-siemens-sysv
    1122         exit 0 ;;
     1245        exit ;;
    11231246    DS/*:UNIX_System_V:*:*)
    11241247        echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
    1125         exit 0 ;;
     1248        exit ;;
    11261249    *:Plan9:*:*)
    11271250        # "uname -m" is not consistent, so use $cputype instead. 386
     
    11341257        fi
    11351258        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 ;;
     1259        exit ;;
    11421260    *:TOPS-10:*:*)
    11431261        echo pdp10-unknown-tops10
    1144         exit 0 ;;
     1262        exit ;;
    11451263    *:TENEX:*:*)
    11461264        echo pdp10-unknown-tenex
    1147         exit 0 ;;
     1265        exit ;;
    11481266    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
    11491267        echo pdp10-dec-tops20
    1150         exit 0 ;;
     1268        exit ;;
    11511269    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
    11521270        echo pdp10-xkl-tops20
    1153         exit 0 ;;
     1271        exit ;;
    11541272    *:TOPS-20:*:*)
    11551273        echo pdp10-unknown-tops20
    1156         exit 0 ;;
     1274        exit ;;
    11571275    *:ITS:*:*)
    11581276        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 ;;
     1277        exit ;;
     1278    SEI:*:*:SEIUX)
     1279        echo mips-sei-seiux${UNAME_RELEASE}
     1280        exit ;;
     1281    *:DragonFly:*:*)
     1282        echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
     1283        exit ;;
     1284    *:*VMS:*:*)
     1285        UNAME_MACHINE=`(uname -p) 2>/dev/null`
     1286        case "${UNAME_MACHINE}" in
     1287            A*) echo alpha-dec-vms ; exit ;;
     1288            I*) echo ia64-dec-vms ; exit ;;
     1289            V*) echo vax-dec-vms ; exit ;;
     1290        esac ;;
     1291    *:XENIX:*:SysV)
     1292        echo i386-pc-xenix
     1293        exit ;;
     1294    i*86:skyos:*:*)
     1295        echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
     1296        exit ;;
     1297    i*86:rdos:*:*)
     1298        echo ${UNAME_MACHINE}-pc-rdos
     1299        exit ;;
     1300    i*86:AROS:*:*)
     1301        echo ${UNAME_MACHINE}-pc-aros
     1302        exit ;;
    11661303esac
    11671304
     
    11951332
    11961333#if defined (__arm) && defined (__acorn) && defined (__unix)
    1197   printf ("arm-acorn-riscix"); exit (0);
     1334  printf ("arm-acorn-riscix\n"); exit (0);
    11981335#endif
    11991336
     
    12841421EOF
    12851422
    1286 $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && rm -f $dummy.c $dummy && rmdir $tmpdir && exit 0
    1287 rm -f $dummy.c $dummy && rmdir $tmpdir
     1423$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
     1424        { echo "$SYSTEM_NAME"; exit; }
    12881425
    12891426# Apollos put the system type in the environment.
    12901427
    1291 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
     1428test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
    12921429
    12931430# Convex versions that predate uname can use getsysinfo(1)
     
    12981435    c1*)
    12991436        echo c1-convex-bsd
    1300         exit 0 ;;
     1437        exit ;;
    13011438    c2*)
    13021439        if getsysinfo -f scalar_acc
     
    13041441        else echo c2-convex-bsd
    13051442        fi
    1306         exit 0 ;;
     1443        exit ;;
    13071444    c34*)
    13081445        echo c34-convex-bsd
    1309         exit 0 ;;
     1446        exit ;;
    13101447    c38*)
    13111448        echo c38-convex-bsd
    1312         exit 0 ;;
     1449        exit ;;
    13131450    c4*)
    13141451        echo c4-convex-bsd
    1315         exit 0 ;;
     1452        exit ;;
    13161453    esac
    13171454fi
     
    13241461download the most up to date version of the config scripts from
    13251462
    1326     ftp://ftp.gnu.org/pub/gnu/config/
     1463  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
     1464and
     1465  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
    13271466
    13281467If the version you run ($0) is already up to date, please
  • trunk/config.sub

    r1 r378  
    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#   Free Software Foundation, Inc.
     6
     7timestamp='2010-01-22'
    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 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-dietlibc | linux-newlib* | linux-uclibc* | \
     128  uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
     129  kopensolaris*-gnu* | \
     130  storm-chaos* | os2-emx* | rtmk-nova*)
    122131    os=-$maybe_os
    123132    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     
    145154        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
    146155        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
    147         -apple | -axis)
     156        -apple | -axis | -knuth | -cray | -microblaze)
    148157                os=
    149158                basic_machine=$1
     159                ;;
     160        -bluegene*)
     161                os=-cnk
    150162                ;;
    151163        -sim | -cisco | -oki | -wec | -winbond)
     
    170182                os=-hiuxwe2
    171183                ;;
     184        -sco6)
     185                os=-sco5v6
     186                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
     187                ;;
    172188        -sco5)
    173189                os=-sco3.2v5
     
    183199                ;;
    184200        -sco3.2v[4-9]*)
     201                # Don't forget version if it is 3.2v4 or newer.
     202                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
     203                ;;
     204        -sco5v6*)
    185205                # Don't forget version if it is 3.2v4 or newer.
    186206                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
     
    229249        | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
    230250        | 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 \
     251        | am33_2.0 \
     252        | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
     253        | bfin \
     254        | c4x | clipper \
    233255        | d10v | d30v | dlx | dsp16xx \
    234         | fr30 | frv \
     256        | fido | fr30 | frv \
    235257        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
    236258        | i370 | i860 | i960 | ia64 \
    237         | ip2k \
    238         | m32r | m68000 | m68k | m88k | mcore \
     259        | ip2k | iq2000 \
     260        | lm32 \
     261        | m32c | m32r | m32rle | m68000 | m68k | m88k \
     262        | maxq | mb | microblaze | mcore | mep | metag \
    239263        | mips | mipsbe | mipseb | mipsel | mipsle \
    240264        | mips16 \
    241265        | mips64 | mips64el \
     266        | mips64octeon | mips64octeonel \
     267        | mips64orion | mips64orionel \
     268        | mips64r5900 | mips64r5900el \
    242269        | mips64vr | mips64vrel \
    243         | mips64orion | mips64orionel \
    244270        | mips64vr4100 | mips64vr4100el \
    245271        | mips64vr4300 | mips64vr4300el \
    246272        | mips64vr5000 | mips64vr5000el \
     273        | mips64vr5900 | mips64vr5900el \
    247274        | mipsisa32 | mipsisa32el \
     275        | mipsisa32r2 | mipsisa32r2el \
    248276        | mipsisa64 | mipsisa64el \
     277        | mipsisa64r2 | mipsisa64r2el \
    249278        | mipsisa64sb1 | mipsisa64sb1el \
    250279        | mipsisa64sr71k | mipsisa64sr71kel \
    251280        | mipstx39 | mipstx39el \
    252281        | mn10200 | mn10300 \
     282        | moxie \
     283        | mt \
     284        | msp430 \
     285        | nios | nios2 \
    253286        | ns16k | ns32k \
    254         | openrisc | or32 \
     287        | or32 \
    255288        | pdp10 | pdp11 | pj | pjl \
    256289        | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
    257290        | pyramid \
    258         | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
     291        | rx \
     292        | score \
     293        | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
    259294        | sh64 | sh64le \
    260         | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
    261         | strongarm \
    262         | tahoe | thumb | tic80 | tron \
     295        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
     296        | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
     297        | spu | strongarm \
     298        | tahoe | thumb | tic4x | tic80 | tron \
     299        | ubicom32 \
    263300        | v850 | v850e \
    264301        | we32k \
    265         | x86 | xscale | xstormy16 | xtensa \
    266         | z8k)
     302        | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
     303        | z8k | z80)
    267304                basic_machine=$basic_machine-unknown
    268305                ;;
    269         m6811 | m68hc11 | m6812 | m68hc12)
     306        m6811 | m68hc11 | m6812 | m68hc12 | picochip)
    270307                # Motorola 68HC11/12.
    271308                basic_machine=$basic_machine-unknown
     
    273310                ;;
    274311        m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
     312                ;;
     313        ms1)
     314                basic_machine=mt-unknown
    275315                ;;
    276316
     
    293333        | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
    294334        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
    295         | avr-* \
    296         | bs2000-* \
    297         | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \
    298         | clipper-* | cydra-* \
     335        | avr-* | avr32-* \
     336        | bfin-* | bs2000-* \
     337        | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
     338        | clipper-* | craynv-* | cydra-* \
    299339        | d10v-* | d30v-* | dlx-* \
    300340        | elxsi-* \
    301         | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
     341        | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
    302342        | h8300-* | h8500-* \
    303343        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
    304344        | i*86-* | i860-* | i960-* | ia64-* \
    305         | ip2k-* \
    306         | m32r-* \
     345        | ip2k-* | iq2000-* \
     346        | lm32-* \
     347        | m32c-* | m32r-* | m32rle-* \
    307348        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
    308         | m88110-* | m88k-* | mcore-* \
     349        | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
    309350        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
    310351        | mips16-* \
    311352        | mips64-* | mips64el-* \
     353        | mips64octeon-* | mips64octeonel-* \
     354        | mips64orion-* | mips64orionel-* \
     355        | mips64r5900-* | mips64r5900el-* \
    312356        | mips64vr-* | mips64vrel-* \
    313         | mips64orion-* | mips64orionel-* \
    314357        | mips64vr4100-* | mips64vr4100el-* \
    315358        | mips64vr4300-* | mips64vr4300el-* \
    316359        | mips64vr5000-* | mips64vr5000el-* \
     360        | mips64vr5900-* | mips64vr5900el-* \
    317361        | mipsisa32-* | mipsisa32el-* \
     362        | mipsisa32r2-* | mipsisa32r2el-* \
    318363        | mipsisa64-* | mipsisa64el-* \
     364        | mipsisa64r2-* | mipsisa64r2el-* \
    319365        | mipsisa64sb1-* | mipsisa64sb1el-* \
    320366        | mipsisa64sr71k-* | mipsisa64sr71kel-* \
    321         | mipstx39 | mipstx39el \
     367        | mipstx39-* | mipstx39el-* \
     368        | mmix-* \
     369        | mt-* \
     370        | msp430-* \
     371        | nios-* | nios2-* \
    322372        | none-* | np1-* | ns16k-* | ns32k-* \
    323373        | orion-* \
     
    325375        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
    326376        | pyramid-* \
    327         | romp-* | rs6000-* \
    328         | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \
     377        | romp-* | rs6000-* | rx-* \
     378        | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
    329379        | 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-* \
     380        | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
     381        | sparclite-* \
     382        | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
     383        | tahoe-* | thumb-* \
     384        | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
     385        | tile-* | tilegx-* \
     386        | tron-* \
     387        | ubicom32-* \
    333388        | v850-* | v850e-* | vax-* \
    334389        | we32k-* \
    335         | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
    336         | xtensa-* \
     390        | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
     391        | xstormy16-* | xtensa*-* \
    337392        | ymp-* \
    338         | z8k-*)
     393        | z8k-* | z80-*)
     394                ;;
     395        # Recognize the basic CPU types without company name, with glob match.
     396        xtensa*)
     397                basic_machine=$basic_machine-unknown
    339398                ;;
    340399        # Recognize the various machine names and aliases which stand
     
    354413                os=-udi
    355414                ;;
     415        abacus)
     416                basic_machine=abacus-unknown
     417                ;;
    356418        adobe68k)
    357419                basic_machine=m68010-adobe
     
    368430                os=-bsd
    369431                ;;
     432        amd64)
     433                basic_machine=x86_64-pc
     434                ;;
     435        amd64-*)
     436                basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
     437                ;;
    370438        amdahl)
    371439                basic_machine=580-amdahl
     
    391459                os=-bsd
    392460                ;;
     461        aros)
     462                basic_machine=i386-pc
     463                os=-aros
     464                ;;
    393465        aux)
    394466                basic_machine=m68k-apple
     
    399471                os=-dynix
    400472                ;;
     473        blackfin)
     474                basic_machine=bfin-unknown
     475                os=-linux
     476                ;;
     477        blackfin-*)
     478                basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
     479                os=-linux
     480                ;;
     481        bluegene*)
     482                basic_machine=powerpc-ibm
     483                os=-cnk
     484                ;;
    401485        c90)
    402486                basic_machine=c90-cray
    403487                os=-unicos
    404488                ;;
     489        cegcc)
     490                basic_machine=arm-unknown
     491                os=-cegcc
     492                ;;
    405493        convex-c1)
    406494                basic_machine=c1-convex
     
    427515                os=-unicos
    428516                ;;
     517        craynv)
     518                basic_machine=craynv-cray
     519                os=-unicosmp
     520                ;;
     521        cr16)
     522                basic_machine=cr16-unknown
     523                os=-elf
     524                ;;
    429525        crds | unos)
    430526                basic_machine=m68k-crds
    431527                ;;
     528        crisv32 | crisv32-* | etraxfs*)
     529                basic_machine=crisv32-axis
     530                ;;
    432531        cris | cris-* | etrax*)
    433532                basic_machine=cris-axis
     533                ;;
     534        crx)
     535                basic_machine=crx-unknown
     536                os=-elf
    434537                ;;
    435538        da30 | da30-*)
     
    454557                basic_machine=m88k-motorola
    455558                os=-sysv3
     559                ;;
     560        dicos)
     561                basic_machine=i686-pc
     562                os=-dicos
     563                ;;
     564        djgpp)
     565                basic_machine=i586-pc
     566                os=-msdosdjgpp
    456567                ;;
    457568        dpx20 | dpx20-*)
     
    605716                os=-sysv
    606717                ;;
     718        m68knommu)
     719                basic_machine=m68k-unknown
     720                os=-linux
     721                ;;
     722        m68knommu-*)
     723                basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
     724                os=-linux
     725                ;;
    607726        m88k-omron*)
    608727                basic_machine=m88k-omron
     
    616735                os=-sysv
    617736                ;;
     737        microblaze)
     738                basic_machine=microblaze-xilinx
     739                ;;
    618740        mingw32)
    619741                basic_machine=i386-pc
    620742                os=-mingw32
    621743                ;;
     744        mingw32ce)
     745                basic_machine=arm-unknown
     746                os=-mingw32ce
     747                ;;
    622748        miniframe)
    623749                basic_machine=m68000-convergent
     
    633759                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
    634760                ;;
    635         mmix*)
    636                 basic_machine=mmix-knuth
    637                 os=-mmixware
    638                 ;;
    639761        monitor)
    640762                basic_machine=m68k-rom68k
     
    648770                basic_machine=i386-pc
    649771                os=-msdos
     772                ;;
     773        ms1-*)
     774                basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
    650775                ;;
    651776        mvs)
     
    724849                os=-proelf
    725850                ;;
    726         or32 | or32-*)
     851        openrisc | openrisc-*)
    727852                basic_machine=or32-unknown
    728                 os=-coff
     853                ;;
     854        os400)
     855                basic_machine=powerpc-ibm
     856                os=-os400
    729857                ;;
    730858        OSE68000 | ose68000)
     
    744872                os=-osf
    745873                ;;
     874        parisc)
     875                basic_machine=hppa-unknown
     876                os=-linux
     877                ;;
     878        parisc-*)
     879                basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
     880                os=-linux
     881                ;;
    746882        pbd)
    747883                basic_machine=sparc-tti
     
    753889                basic_machine=ns32k-pc532
    754890                ;;
     891        pc98)
     892                basic_machine=i386-pc
     893                ;;
     894        pc98-*)
     895                basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
     896                ;;
    755897        pentium | p5 | k5 | k6 | nexgen | viac3)
    756898                basic_machine=i586-pc
     
    759901                basic_machine=i686-pc
    760902                ;;
    761         pentiumii | pentium2)
     903        pentiumii | pentium2 | pentiumiii | pentium3)
    762904                basic_machine=i686-pc
     905                ;;
     906        pentium4)
     907                basic_machine=i786-pc
    763908                ;;
    764909        pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
     
    768913                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
    769914                ;;
    770         pentiumii-* | pentium2-*)
     915        pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
    771916                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
     917                ;;
     918        pentium4-*)
     919                basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
    772920                ;;
    773921        pn)
     
    803951                os=-pw32
    804952                ;;
     953        rdos)
     954                basic_machine=i386-pc
     955                os=-rdos
     956                ;;
    805957        rom68k)
    806958                basic_machine=m68k-rom68k
     
    829981                basic_machine=mipsisa64sb1el-unknown
    830982                ;;
     983        sde)
     984                basic_machine=mipsisa32-sde
     985                os=-elf
     986                ;;
     987        sei)
     988                basic_machine=mips-sei
     989                os=-seiux
     990                ;;
    831991        sequent)
    832992                basic_machine=i386-sequent
     
    836996                os=-hms
    837997                ;;
     998        sh5el)
     999                basic_machine=sh5le-unknown
     1000                ;;
     1001        sh64)
     1002                basic_machine=sh64-unknown
     1003                ;;
    8381004        sparclite-wrs | simso-wrs)
    8391005                basic_machine=sparclite-wrs
     
    9021068                os=-dynix
    9031069                ;;
    904         t3d)
    905                 basic_machine=alpha-cray
    906                 os=-unicos
    907                 ;;
    9081070        t3e)
    9091071                basic_machine=alphaev5-cray
     
    9141076                os=-unicos
    9151077                ;;
    916         tic4x | c4x*)
    917                 basic_machine=tic4x-unknown
    918                 os=-coff
    919                 ;;
    9201078        tic54x | c54x*)
    9211079                basic_machine=tic54x-unknown
    9221080                os=-coff
    9231081                ;;
     1082        tic55x | c55x*)
     1083                basic_machine=tic55x-unknown
     1084                os=-coff
     1085                ;;
     1086        tic6x | c6x*)
     1087                basic_machine=tic6x-unknown
     1088                os=-coff
     1089                ;;
     1090        # This must be matched before tile*.
     1091        tilegx*)
     1092                basic_machine=tilegx-unknown
     1093                os=-linux-gnu
     1094                ;;
     1095        tile*)
     1096                basic_machine=tile-unknown
     1097                os=-linux-gnu
     1098                ;;
    9241099        tx39)
    9251100                basic_machine=mipstx39-unknown
     
    9351110                basic_machine=m68k-ncr
    9361111                ;;
     1112        tpf)
     1113                basic_machine=s390x-ibm
     1114                os=-tpf
     1115                ;;
    9371116        udi29k)
    9381117                basic_machine=a29k-amd
     
    9781157                os=-proelf
    9791158                ;;
    980         windows32)
    981                 basic_machine=i386-pc
    982                 os=-windows32-msvcrt
     1159        xbox)
     1160                basic_machine=i686-pc
     1161                os=-mingw32
    9831162                ;;
    9841163        xps | xps100)
     
    9911170        z8k-*-coff)
    9921171                basic_machine=z8k-unknown
     1172                os=-sim
     1173                ;;
     1174        z80-*-coff)
     1175                basic_machine=z80-unknown
    9931176                os=-sim
    9941177                ;;
     
    10121195                basic_machine=romp-ibm
    10131196                ;;
     1197        mmix)
     1198                basic_machine=mmix-knuth
     1199                ;;
    10141200        rs6000)
    10151201                basic_machine=rs6000-ibm
     
    10281214                basic_machine=we32k-att
    10291215                ;;
    1030         sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele)
     1216        sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
    10311217                basic_machine=sh-unknown
    10321218                ;;
    1033         sh64)
    1034                 basic_machine=sh64-unknown
    1035                 ;;
    1036         sparc | sparcv9 | sparcv9b)
     1219        sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
    10371220                basic_machine=sparc-sun
    10381221                ;;
     
    10811264        # that might get confused with valid system types.
    10821265        # -solaris* is a basic system type, with this one exception.
     1266        -auroraux)
     1267                os=-auroraux
     1268                ;;
    10831269        -solaris1 | -solaris1.*)
    10841270                os=`echo $os | sed -e 's|solaris1|sunos4|'`
     
    11011287        # -sysv* is not here because it comes later, after sysvr4.
    11021288        -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
    1103               | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
    1104               | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
     1289              | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
     1290              | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
     1291              | -sym* | -kopensolaris* \
    11051292              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
    1106               | -aos* \
     1293              | -aos* | -aros* \
    11071294              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
    11081295              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
    1109               | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
    1110               | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
     1296              | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
     1297              | -openbsd* | -solidbsd* \
     1298              | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
     1299              | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
    11111300              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
    11121301              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
    1113               | -chorusos* | -chorusrdb* \
     1302              | -chorusos* | -chorusrdb* | -cegcc* \
    11141303              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
    1115               | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
    1116               | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
     1304              | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
     1305              | -uxpv* | -beos* | -mpeix* | -udk* \
     1306              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
    11171307              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
    11181308              | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
    11191309              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
    1120               | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* | -powermax*)
     1310              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
     1311              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
     1312              | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
    11211313        # Remember, each alternative MUST END IN *, to match a version number.
    11221314                ;;
     
    11301322                esac
    11311323                ;;
     1324        -nto-qnx*)
     1325                ;;
    11321326        -nto*)
    1133                 os=-nto-qnx
     1327                os=`echo $os | sed -e 's|nto|nto-qnx|'`
    11341328                ;;
    11351329        -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
    1136               | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
     1330              | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
    11371331              | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
    11381332                ;;
     
    11401334                os=`echo $os | sed -e 's|mac|macos|'`
    11411335                ;;
     1336        -linux-dietlibc)
     1337                os=-linux-dietlibc
     1338                ;;
    11421339        -linux*)
    11431340                os=`echo $os | sed -e 's|linux|linux-gnu|'`
     
    11521349                os=-openedition
    11531350                ;;
     1351        -os400*)
     1352                os=-os400
     1353                ;;
    11541354        -wince*)
    11551355                os=-wince
     
    11721372        -atheos*)
    11731373                os=-atheos
     1374                ;;
     1375        -syllable*)
     1376                os=-syllable
    11741377                ;;
    11751378        -386bsd)
     
    11951398                os=-sysv4
    11961399                ;;
     1400        -tpf*)
     1401                os=-tpf
     1402                ;;
    11971403        -triton*)
    11981404                os=-sysv3
     
    12251431                os=-mint
    12261432                ;;
     1433        -aros*)
     1434                os=-aros
     1435                ;;
     1436        -kaos*)
     1437                os=-kaos
     1438                ;;
     1439        -zvmoe)
     1440                os=-zvmoe
     1441                ;;
     1442        -dicos*)
     1443                os=-dicos
     1444                ;;
     1445        -nacl*)
     1446                ;;
    12271447        -none)
    12281448                ;;
     
    12471467
    12481468case $basic_machine in
     1469        score-*)
     1470                os=-elf
     1471                ;;
     1472        spu-*)
     1473                os=-elf
     1474                ;;
    12491475        *-acorn)
    12501476                os=-riscix1.2
     
    12551481        arm*-semi)
    12561482                os=-aout
     1483                ;;
     1484        c4x-* | tic4x-*)
     1485                os=-coff
    12571486                ;;
    12581487        # This must come before the *-dec entry.
     
    12811510                os=-aout
    12821511                ;;
     1512        mep-*)
     1513                os=-elf
     1514                ;;
    12831515        mips*-cisco)
    12841516                os=-elf
     
    12991531                os=-beos
    13001532                ;;
     1533        *-haiku)
     1534                os=-haiku
     1535                ;;
    13011536        *-ibm)
    13021537                os=-aix
     1538                ;;
     1539        *-knuth)
     1540                os=-mmixware
    13031541                ;;
    13041542        *-wec)
     
    14041642                                vendor=sun
    14051643                                ;;
    1406                         -aix*)
     1644                        -cnk*|-aix*)
    14071645                                vendor=ibm
    14081646                                ;;
     
    14341672                                vendor=ibm
    14351673                                ;;
     1674                        -os400*)
     1675                                vendor=ibm
     1676                                ;;
    14361677                        -ptx*)
    14371678                                vendor=sequent
    14381679                                ;;
     1680                        -tpf*)
     1681                                vendor=ibm
     1682                                ;;
    14391683                        -vxsim* | -vxworks* | -windiss*)
    14401684                                vendor=wrs
     
    14611705
    14621706echo $basic_machine$os
    1463 exit 0
     1707exit
    14641708
    14651709# Local variables:
  • trunk/configure.ac

    r377 r378  
    9191        ;;
    9292
    93         *darwin*)
     93        *darwin*|*apple*)
    9494        AC_DEFINE(HOST_IS_DARWIN)
    9595        dnmalloc_ok=no
  • trunk/docs/Changelog

    r377 r378  
     13.0.1:
     2        * fix potential deadlock in sh_files.c (reported by S. Mirolo)
     3        * change Makefile.in to stop on compile error rather than at link stage
     4          (suggested by S. Mirolo)
     5        * fix compile errors caused by missing #define (pthread disabled) and
     6          wrong function call (OSX specific code), reported by S. Mirolo
     7
    183.0.0a:
    29        * Fix compile-time issues on RHEL5 (reported by Thomas)
  • trunk/include/sh_pthread.h

    r371 r378  
    164164#define SH_MUTEX_TRYLOCK(M)                     ((void)0)
    165165#define SH_MUTEX_UNLOCK(M)                      ((void)0)
     166#define SH_MUTEX_TRYLOCK_UNLOCK(M)              ((void)0)
    166167#define SH_MUTEX_LOCK_UNSAFE(M)                 ((void)0)
    167168#define SH_MUTEX_TRYLOCK_UNSAFE(M)              (0)
  • trunk/src/sh_files.c

    r377 r378  
    25982598          if (S_TRUE == sh_unix_file_exists (testpath))
    25992599            {
    2600               sh_files_filecheck (class, fullpath, rsrc, &dummy, 1);
     2600              sh_files_filecheck (class, check_mask, fullpath, rsrc, &dummy, 1);
    26012601            }
    26022602        }
     
    28352835    SL_RETURN(0, _("check_file"));
    28362836
    2837   SH_MUTEX_LOCK(mutex_zfiles);
    28382837  for (pfilL = (dirstack_t *) zAVLFirst (&cursor, zfileList); pfilL;
    28392838       pfilL = (dirstack_t *) zAVLNext  (&cursor))
     
    28482847        }
    28492848    }
    2850   SH_MUTEX_UNLOCK(mutex_zfiles);
    28512849
    28522850  SL_RETURN(retval, _("check_file"));
  • trunk/test/testcompile.sh

    r344 r378  
    275275                C_LOGFILE=" --enable-logfile-monitor "
    276276            else
    277                 ls /usr/local/lib/libpcre* >/dev/null 2>&1
     277                ls /usr/lib/*/libpcre* >/dev/null 2>&1
    278278                if [ $? -eq 0 ]; then
    279279                    C_LOGFILE=" --enable-logfile-monitor "
     280                else
     281                    ls /usr/local/lib/libpcre* >/dev/null 2>&1
     282                    if [ $? -eq 0 ]; then
     283                        C_LOGFILE=" --enable-logfile-monitor "
     284                    fi
    280285                fi
    281286            fi
  • trunk/test/testhash.sh

    r371 r378  
    3939                C_LOGFILE=" --enable-logfile-monitor "
    4040            else
    41                 ls /usr/local/lib/libpcre* >/dev/null 2>&1
    42                 if [ $? -eq 0 ]; then
    43                     C_LOGFILE=" --enable-logfile-monitor "
    44                 fi
     41                ls /usr/lib/*/libpcre* >/dev/null 2>&1
     42                if [ $? -eq 0 ]; then
     43                    C_LOGFILE=" --enable-logfile-monitor "
     44                else
     45                    ls /usr/local/lib/libpcre* >/dev/null 2>&1
     46                    if [ $? -eq 0 ]; then
     47                        C_LOGFILE=" --enable-logfile-monitor "
     48                    fi
     49                fi
    4550            fi
    4651        fi
Note: See TracChangeset for help on using the changeset viewer.