Changeset 4192


Ignore:
Timestamp:
Jul 3, 2012 7:46:49 AM (12 years ago)
Author:
ming
Message:

Re #1516: Build system for Android
How to use:

  • export ANDROID_NDK=/path_to_android_ndk_dir
  • Run ./configure-android
Location:
pjproject/branches/projects/android
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/projects/android/aconfigure

    r4149 r4192  
    46754675 
    46764676case $target in 
     4677    *android*) 
     4678        $as_echo "#define PJ_ANDROID 1" >>confdefs.h 
     4679 
     4680        ;; 
    46774681    *mingw* | *cygw* | *win32* | *w32* ) 
    46784682        $as_echo "#define PJ_WIN32 1" >>confdefs.h 
     
    56535657else 
    56545658 case $target in 
     5659  *android*) 
     5660        LIBS="$LIBS -lOpenSLES" 
     5661        { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking sound device backend... OpenSL ES" >&5 
     5662$as_echo "Checking sound device backend... OpenSL ES" >&6; } 
     5663        ;; 
    56555664  arm-apple-darwin*) 
    56565665        LIBS="$LIBS -framework CoreAudio -framework CoreFoundation -framework AudioToolbox -framework CFNetwork -framework UIKit" 
     
    57325741 
    57335742case $target in 
     5743 *android*) 
     5744        LIBS="$LIBS -llog -lgcc" 
     5745        ;; 
    57345746 arm-apple-darwin*) 
    57355747        LIBS="$LIBS -framework UIKit" 
  • pjproject/branches/projects/android/aconfigure.ac

    r4149 r4192  
    158158dnl 
    159159case $target in 
     160    *android*) 
     161        AC_DEFINE(PJ_ANDROID,1) 
     162        ;; 
    160163    *mingw* | *cygw* | *win32* | *w32* ) 
    161164        AC_DEFINE(PJ_WIN32,1) 
     
    570573else 
    571574 case $target in 
     575  *android*) 
     576        LIBS="$LIBS -lOpenSLES" 
     577        AC_MSG_RESULT([Checking sound device backend... OpenSL ES]) 
     578        ;; 
    572579  arm-apple-darwin*) 
    573580        LIBS="$LIBS -framework CoreAudio -framework CoreFoundation -framework AudioToolbox -framework CFNetwork -framework UIKit" 
     
    635642 
    636643case $target in 
     644 *android*) 
     645        LIBS="$LIBS -llog -lgcc" 
     646        ;; 
    637647 arm-apple-darwin*) 
    638648        LIBS="$LIBS -framework UIKit" 
  • pjproject/branches/projects/android/build.mak.in

    r3999 r4192  
    114114        -I$(PJDIR)/pjmedia/include\ 
    115115        -I$(PJDIR)/pjsip/include 
    116 export APP_CXXFLAGS := $(APP_CFLAGS) 
     116export APP_CXXFLAGS := @CXXFLAGS@ 
    117117export APP_LDFLAGS := -L$(PJDIR)/pjlib/lib\ 
    118118        -L$(PJDIR)/pjlib-util/lib\ 
  • pjproject/branches/projects/android/config.guess

    r795 r4192  
    11#! /bin/sh 
    22# Attempt to guess a canonical system name. 
    3 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 
    4 #   Free Software Foundation, Inc. 
    5  
    6 timestamp='2001-09-04' 
     3#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 
     4#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 
     5#   2011, 2012 Free Software Foundation, Inc. 
     6 
     7timestamp='2012-06-17' 
    78 
    89# This file is free software; you can redistribute it and/or modify it 
     
    1718# 
    1819# You should have received a copy of the GNU General Public License 
    19 # along with this program; if not, write to the Free Software 
    20 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
     20# along with this program; if not, see <http://www.gnu.org/licenses/>. 
    2121# 
    2222# As a special exception to the GNU General Public License, if you 
     
    2525# the same distribution terms that you use for the rest of that program. 
    2626 
    27 # Written by Per Bothner <bothner@cygnus.com>. 
    28 # Please send patches to <config-patches@gnu.org>. 
     27 
     28# Originally written by Per Bothner.  Please send patches (context 
     29# diff format) to <config-patches@gnu.org> and include a ChangeLog 
     30# entry. 
    2931# 
    3032# This script attempts to guess a canonical system name similar to 
     
    3234# exits with 0.  Otherwise, it exits with 1. 
    3335# 
    34 # The plan is that this can be called by configure scripts if you 
    35 # don't specify an explicit build system type. 
     36# You can get the latest version of this script from: 
     37# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 
    3638 
    3739me=`echo "$0" | sed -e 's,.*/,,'` 
     
    5355 
    5456Originally written by Per Bothner. 
    55 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 
     57Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 
     582001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 
    5659Free Software Foundation, Inc. 
    5760 
     
    6669  case $1 in 
    6770    --time-stamp | --time* | -t ) 
    68        echo "$timestamp" ; exit 0 ;; 
     71       echo "$timestamp" ; exit ;; 
    6972    --version | -v ) 
    70        echo "$version" ; exit 0 ;; 
     73       echo "$version" ; exit ;; 
    7174    --help | --h* | -h ) 
    72        echo "$usage"; exit 0 ;; 
     75       echo "$usage"; exit ;; 
    7376    -- )     # Stop option processing 
    7477       shift; break ;; 
     
    8891fi 
    8992 
    90  
    91 dummy=dummy-$$ 
    92 trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 
    93  
    94 # CC_FOR_BUILD -- compiler used by this script. 
     93trap 'exit 1' 1 2 15 
     94 
     95# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 
     96# compiler to aid in system detection is discouraged as it requires 
     97# temporary files to be created and, as you can see below, it is a 
     98# headache to deal with in a portable fashion. 
     99 
    95100# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 
    96101# use `HOST_CC' if defined, but it is deprecated. 
    97102 
    98 set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in 
    99  ,,)    echo "int dummy(){}" > $dummy.c ; 
    100         for c in cc gcc c89 ; do 
    101           ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; 
    102           if test $? = 0 ; then 
     103# Portable tmp directory creation inspired by the Autoconf team. 
     104 
     105set_cc_for_build=' 
     106trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 
     107trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 
     108: ${TMPDIR=/tmp} ; 
     109 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 
     110 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 
     111 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 
     112 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 
     113dummy=$tmp/dummy ; 
     114tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 
     115case $CC_FOR_BUILD,$HOST_CC,$CC in 
     116 ,,)    echo "int x;" > $dummy.c ; 
     117        for c in cc gcc c89 c99 ; do 
     118          if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 
    103119             CC_FOR_BUILD="$c"; break ; 
    104120          fi ; 
    105121        done ; 
    106         rm -f $dummy.c $dummy.o $dummy.rel ; 
    107122        if test x"$CC_FOR_BUILD" = x ; then 
    108123          CC_FOR_BUILD=no_compiler_found ; 
     
    111126 ,,*)   CC_FOR_BUILD=$CC ;; 
    112127 ,*,*)  CC_FOR_BUILD=$HOST_CC ;; 
    113 esac' 
     128esac ; set_cc_for_build= ;' 
    114129 
    115130# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 
     
    128143case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 
    129144    *:NetBSD:*:*) 
    130         # Netbsd (nbsd) targets should (where applicable) match one or 
    131         # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, 
     145        # NetBSD (nbsd) targets should (where applicable) match one or 
     146        # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, 
    132147        # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently 
    133148        # switched to ELF, *-*-netbsd* would select the old 
     
    135150        # compatibility and a consistent mechanism for selecting the 
    136151        # object file format. 
    137         # Determine the machine/vendor (is the vendor relevant). 
    138         case "${UNAME_MACHINE}" in 
    139             amiga) machine=m68k-unknown ;; 
    140             arm32) machine=arm-unknown ;; 
    141             atari*) machine=m68k-atari ;; 
    142             sun3*) machine=m68k-sun ;; 
    143             mac68k) machine=m68k-apple ;; 
    144             macppc) machine=powerpc-apple ;; 
    145             hp3[0-9][05]) machine=m68k-hp ;; 
    146             ibmrt|romp-ibm) machine=romp-ibm ;; 
    147             *) machine=${UNAME_MACHINE}-unknown ;; 
     152        # 
     153        # Note: NetBSD doesn't particularly care about the vendor 
     154        # portion of the name.  We always set it to "unknown". 
     155        sysctl="sysctl -n hw.machine_arch" 
     156        UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 
     157            /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 
     158        case "${UNAME_MACHINE_ARCH}" in 
     159            armeb) machine=armeb-unknown ;; 
     160            arm*) machine=arm-unknown ;; 
     161            sh3el) machine=shl-unknown ;; 
     162            sh3eb) machine=sh-unknown ;; 
     163            sh5el) machine=sh5le-unknown ;; 
     164            *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 
    148165        esac 
    149166        # The Operating System including object format, if it has switched 
    150167        # to ELF recently, or will in the future. 
    151         case "${UNAME_MACHINE}" in 
    152             i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) 
     168        case "${UNAME_MACHINE_ARCH}" in 
     169            arm*|i386|m68k|ns32k|sh3*|sparc|vax) 
    153170                eval $set_cc_for_build 
    154171                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 
    155                         | grep __ELF__ >/dev/null 
     172                        | grep -q __ELF__ 
    156173                then 
    157174                    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). 
     
    163180                ;; 
    164181            *) 
    165                 os=netbsd 
     182                os=netbsd 
    166183                ;; 
    167184        esac 
    168185        # The OS release 
    169         release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 
     186        # Debian GNU/NetBSD machines have a different userland, and 
     187        # thus, need a distinct triplet. However, they do not need 
     188        # kernel version information, so it can be replaced with a 
     189        # suitable tag, in the style of linux-gnu. 
     190        case "${UNAME_VERSION}" in 
     191            Debian*) 
     192                release='-gnu' 
     193                ;; 
     194            *) 
     195                release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 
     196                ;; 
     197        esac 
    170198        # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 
    171199        # contains redundant information, the shorter form: 
    172200        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 
    173201        echo "${machine}-${os}${release}" 
    174         exit 0 ;; 
     202        exit ;; 
     203    *:Bitrig:*:*) 
     204        UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` 
     205        echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} 
     206        exit ;; 
     207    *:OpenBSD:*:*) 
     208        UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 
     209        echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 
     210        exit ;; 
     211    *:ekkoBSD:*:*) 
     212        echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 
     213        exit ;; 
     214    *:SolidBSD:*:*) 
     215        echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 
     216        exit ;; 
     217    macppc:MirBSD:*:*) 
     218        echo powerpc-unknown-mirbsd${UNAME_RELEASE} 
     219        exit ;; 
     220    *:MirBSD:*:*) 
     221        echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 
     222        exit ;; 
    175223    alpha:OSF1:*:*) 
    176         if test $UNAME_RELEASE = "V4.0"; then 
     224        case $UNAME_RELEASE in 
     225        *4.0) 
    177226                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 
    178         fi 
     227                ;; 
     228        *5.*) 
     229                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 
     230                ;; 
     231        esac 
     232        # According to Compaq, /usr/sbin/psrinfo has been available on 
     233        # OSF/1 and Tru64 systems produced since 1995.  I hope that 
     234        # covers most systems running today.  This code pipes the CPU 
     235        # types through head -n 1, so we only detect the type of CPU 0. 
     236        ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1` 
     237        case "$ALPHA_CPU_TYPE" in 
     238            "EV4 (21064)") 
     239                UNAME_MACHINE="alpha" ;; 
     240            "EV4.5 (21064)") 
     241                UNAME_MACHINE="alpha" ;; 
     242            "LCA4 (21066/21068)") 
     243                UNAME_MACHINE="alpha" ;; 
     244            "EV5 (21164)") 
     245                UNAME_MACHINE="alphaev5" ;; 
     246            "EV5.6 (21164A)") 
     247                UNAME_MACHINE="alphaev56" ;; 
     248            "EV5.6 (21164PC)") 
     249                UNAME_MACHINE="alphapca56" ;; 
     250            "EV5.7 (21164PC)") 
     251                UNAME_MACHINE="alphapca57" ;; 
     252            "EV6 (21264)") 
     253                UNAME_MACHINE="alphaev6" ;; 
     254            "EV6.7 (21264A)") 
     255                UNAME_MACHINE="alphaev67" ;; 
     256            "EV6.8CB (21264C)") 
     257                UNAME_MACHINE="alphaev68" ;; 
     258            "EV6.8AL (21264B)") 
     259                UNAME_MACHINE="alphaev68" ;; 
     260            "EV6.8CX (21264D)") 
     261                UNAME_MACHINE="alphaev68" ;; 
     262            "EV6.9A (21264/EV69A)") 
     263                UNAME_MACHINE="alphaev69" ;; 
     264            "EV7 (21364)") 
     265                UNAME_MACHINE="alphaev7" ;; 
     266            "EV7.9 (21364A)") 
     267                UNAME_MACHINE="alphaev79" ;; 
     268        esac 
     269        # A Pn.n version is a patched version. 
    179270        # A Vn.n version is a released version. 
    180271        # A Tn.n version is a released field test version. 
    181272        # A Xn.n version is an unreleased experimental baselevel. 
    182273        # 1.2 uses "1.2" for uname -r. 
    183         cat <<EOF >$dummy.s 
    184         .data 
    185 \$Lformat: 
    186         .byte 37,100,45,37,120,10,0     # "%d-%x\n" 
    187  
    188         .text 
    189         .globl main 
    190         .align 4 
    191         .ent main 
    192 main: 
    193         .frame \$30,16,\$26,0 
    194         ldgp \$29,0(\$27) 
    195         .prologue 1 
    196         .long 0x47e03d80 # implver \$0 
    197         lda \$2,-1 
    198         .long 0x47e20c21 # amask \$2,\$1 
    199         lda \$16,\$Lformat 
    200         mov \$0,\$17 
    201         not \$1,\$18 
    202         jsr \$26,printf 
    203         ldgp \$29,0(\$26) 
    204         mov 0,\$16 
    205         jsr \$26,exit 
    206         .end main 
    207 EOF 
    208         eval $set_cc_for_build 
    209         $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null 
    210         if test "$?" = 0 ; then 
    211                 case `./$dummy` in 
    212                         0-0) 
    213                                 UNAME_MACHINE="alpha" 
    214                                 ;; 
    215                         1-0) 
    216                                 UNAME_MACHINE="alphaev5" 
    217                                 ;; 
    218                         1-1) 
    219                                 UNAME_MACHINE="alphaev56" 
    220                                 ;; 
    221                         1-101) 
    222                                 UNAME_MACHINE="alphapca56" 
    223                                 ;; 
    224                         2-303) 
    225                                 UNAME_MACHINE="alphaev6" 
    226                                 ;; 
    227                         2-307) 
    228                                 UNAME_MACHINE="alphaev67" 
    229                                 ;; 
    230                         2-1307) 
    231                                 UNAME_MACHINE="alphaev68" 
    232                                 ;; 
    233                 esac 
    234         fi 
    235         rm -f $dummy.s $dummy 
    236         echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 
    237         exit 0 ;; 
     274        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 
     275        # Reset EXIT trap before exiting to avoid spurious non-zero exit code. 
     276        exitcode=$? 
     277        trap '' 0 
     278        exit $exitcode ;; 
    238279    Alpha\ *:Windows_NT*:*) 
    239280        # How do we know it's Interix rather than the generic POSIX subsystem? 
     
    241282        # of the specific Alpha model? 
    242283        echo alpha-pc-interix 
    243         exit 0 ;; 
     284        exit ;; 
    244285    21064:Windows_NT:50:3) 
    245286        echo alpha-dec-winnt3.5 
    246         exit 0 ;; 
     287        exit ;; 
    247288    Amiga*:UNIX_System_V:4.0:*) 
    248289        echo m68k-unknown-sysv4 
    249         exit 0;; 
    250     amiga:OpenBSD:*:*) 
    251         echo m68k-unknown-openbsd${UNAME_RELEASE} 
    252         exit 0 ;; 
     290        exit ;; 
    253291    *:[Aa]miga[Oo][Ss]:*:*) 
    254292        echo ${UNAME_MACHINE}-unknown-amigaos 
    255         exit 0 ;; 
    256     arc64:OpenBSD:*:*) 
    257         echo mips64el-unknown-openbsd${UNAME_RELEASE} 
    258         exit 0 ;; 
    259     arc:OpenBSD:*:*) 
    260         echo mipsel-unknown-openbsd${UNAME_RELEASE} 
    261         exit 0 ;; 
    262     hkmips:OpenBSD:*:*) 
    263         echo mips-unknown-openbsd${UNAME_RELEASE} 
    264         exit 0 ;; 
    265     pmax:OpenBSD:*:*) 
    266         echo mipsel-unknown-openbsd${UNAME_RELEASE} 
    267         exit 0 ;; 
    268     sgi:OpenBSD:*:*) 
    269         echo mips-unknown-openbsd${UNAME_RELEASE} 
    270         exit 0 ;; 
    271     wgrisc:OpenBSD:*:*) 
    272         echo mipsel-unknown-openbsd${UNAME_RELEASE} 
    273         exit 0 ;; 
     293        exit ;; 
     294    *:[Mm]orph[Oo][Ss]:*:*) 
     295        echo ${UNAME_MACHINE}-unknown-morphos 
     296        exit ;; 
    274297    *:OS/390:*:*) 
    275298        echo i370-ibm-openedition 
    276         exit 0 ;; 
     299        exit ;; 
     300    *:z/VM:*:*) 
     301        echo s390-ibm-zvmoe 
     302        exit ;; 
     303    *:OS400:*:*) 
     304        echo powerpc-ibm-os400 
     305        exit ;; 
    277306    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 
    278307        echo arm-acorn-riscix${UNAME_RELEASE} 
    279         exit 0;; 
     308        exit ;; 
     309    arm:riscos:*:*|arm:RISCOS:*:*) 
     310        echo arm-unknown-riscos 
     311        exit ;; 
    280312    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 
    281313        echo hppa1.1-hitachi-hiuxmpp 
    282         exit 0;; 
     314        exit ;; 
    283315    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 
    284316        # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 
     
    288320                echo pyramid-pyramid-bsd 
    289321        fi 
    290         exit 0 ;; 
     322        exit ;; 
    291323    NILE*:*:*:dcosx) 
    292324        echo pyramid-pyramid-svr4 
    293         exit 0 ;; 
     325        exit ;; 
     326    DRS?6000:unix:4.0:6*) 
     327        echo sparc-icl-nx6 
     328        exit ;; 
     329    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 
     330        case `/usr/bin/uname -p` in 
     331            sparc) echo sparc-icl-nx7; exit ;; 
     332        esac ;; 
     333    s390x:SunOS:*:*) 
     334        echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 
     335        exit ;; 
    294336    sun4H:SunOS:5.*:*) 
    295337        echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 
    296         exit 0 ;; 
     338        exit ;; 
    297339    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 
    298340        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 
    299         exit 0 ;; 
    300     i86pc:SunOS:5.*:*) 
    301         echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 
    302         exit 0 ;; 
     341        exit ;; 
     342    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) 
     343        echo i386-pc-auroraux${UNAME_RELEASE} 
     344        exit ;; 
     345    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) 
     346        eval $set_cc_for_build 
     347        SUN_ARCH="i386" 
     348        # If there is a compiler, see if it is configured for 64-bit objects. 
     349        # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. 
     350        # This test works for both compilers. 
     351        if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 
     352            if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ 
     353                (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 
     354                grep IS_64BIT_ARCH >/dev/null 
     355            then 
     356                SUN_ARCH="x86_64" 
     357            fi 
     358        fi 
     359        echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 
     360        exit ;; 
    303361    sun4*:SunOS:6*:*) 
    304362        # According to config.sub, this is the proper way to canonicalize 
     
    306364        # it's likely to be more like Solaris than SunOS4. 
    307365        echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 
    308         exit 0 ;; 
     366        exit ;; 
    309367    sun4*:SunOS:*:*) 
    310368        case "`/usr/bin/arch -k`" in 
     
    315373        # Japanese Language versions have a version number like `4.1.3-JL'. 
    316374        echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 
    317         exit 0 ;; 
     375        exit ;; 
    318376    sun3*:SunOS:*:*) 
    319377        echo m68k-sun-sunos${UNAME_RELEASE} 
    320         exit 0 ;; 
     378        exit ;; 
    321379    sun*:*:4.2BSD:*) 
    322         UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 
     380        UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 
    323381        test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 
    324382        case "`/bin/arch`" in 
     
    330388                ;; 
    331389        esac 
    332         exit 0 ;; 
     390        exit ;; 
    333391    aushp:SunOS:*:*) 
    334392        echo sparc-auspex-sunos${UNAME_RELEASE} 
    335         exit 0 ;; 
    336     sparc*:NetBSD:*) 
    337         echo `uname -p`-unknown-netbsd${UNAME_RELEASE} 
    338         exit 0 ;; 
    339     atari*:OpenBSD:*:*) 
    340         echo m68k-unknown-openbsd${UNAME_RELEASE} 
    341         exit 0 ;; 
     393        exit ;; 
    342394    # The situation for MiNT is a little confusing.  The machine name 
    343395    # can be virtually everything (everything which is not 
     
    349401    # be no problem. 
    350402    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 
    351         echo m68k-atari-mint${UNAME_RELEASE} 
    352         exit 0 ;; 
     403        echo m68k-atari-mint${UNAME_RELEASE} 
     404        exit ;; 
    353405    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 
    354406        echo m68k-atari-mint${UNAME_RELEASE} 
    355         exit 0 ;; 
     407        exit ;; 
    356408    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 
    357         echo m68k-atari-mint${UNAME_RELEASE} 
    358         exit 0 ;; 
     409        echo m68k-atari-mint${UNAME_RELEASE} 
     410        exit ;; 
    359411    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 
    360         echo m68k-milan-mint${UNAME_RELEASE} 
    361         exit 0 ;; 
     412        echo m68k-milan-mint${UNAME_RELEASE} 
     413        exit ;; 
    362414    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 
    363         echo m68k-hades-mint${UNAME_RELEASE} 
    364         exit 0 ;; 
     415        echo m68k-hades-mint${UNAME_RELEASE} 
     416        exit ;; 
    365417    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 
    366         echo m68k-unknown-mint${UNAME_RELEASE} 
    367         exit 0 ;; 
    368     sun3*:OpenBSD:*:*) 
    369         echo m68k-unknown-openbsd${UNAME_RELEASE} 
    370         exit 0 ;; 
    371     mac68k:OpenBSD:*:*) 
    372         echo m68k-unknown-openbsd${UNAME_RELEASE} 
    373         exit 0 ;; 
    374     mvme68k:OpenBSD:*:*) 
    375         echo m68k-unknown-openbsd${UNAME_RELEASE} 
    376         exit 0 ;; 
    377     mvme88k:OpenBSD:*:*) 
    378         echo m88k-unknown-openbsd${UNAME_RELEASE} 
    379         exit 0 ;; 
     418        echo m68k-unknown-mint${UNAME_RELEASE} 
     419        exit ;; 
     420    m68k:machten:*:*) 
     421        echo m68k-apple-machten${UNAME_RELEASE} 
     422        exit ;; 
    380423    powerpc:machten:*:*) 
    381424        echo powerpc-apple-machten${UNAME_RELEASE} 
    382         exit 0 ;; 
     425        exit ;; 
    383426    RISC*:Mach:*:*) 
    384427        echo mips-dec-mach_bsd4.3 
    385         exit 0 ;; 
     428        exit ;; 
    386429    RISC*:ULTRIX:*:*) 
    387430        echo mips-dec-ultrix${UNAME_RELEASE} 
    388         exit 0 ;; 
     431        exit ;; 
    389432    VAX*:ULTRIX*:*:*) 
    390433        echo vax-dec-ultrix${UNAME_RELEASE} 
    391         exit 0 ;; 
     434        exit ;; 
    392435    2020:CLIX:*:* | 2430:CLIX:*:*) 
    393436        echo clipper-intergraph-clix${UNAME_RELEASE} 
    394         exit 0 ;; 
     437        exit ;; 
    395438    mips:*:*:UMIPS | mips:*:*:RISCos) 
    396439        eval $set_cc_for_build 
     
    416459        } 
    417460EOF 
    418         $CC_FOR_BUILD $dummy.c -o $dummy \ 
    419           && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ 
    420           && rm -f $dummy.c $dummy && exit 0 
    421         rm -f $dummy.c $dummy 
     461        $CC_FOR_BUILD -o $dummy $dummy.c && 
     462          dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 
     463          SYSTEM_NAME=`$dummy $dummyarg` && 
     464            { echo "$SYSTEM_NAME"; exit; } 
    422465        echo mips-mips-riscos${UNAME_RELEASE} 
    423         exit 0 ;; 
     466        exit ;; 
    424467    Motorola:PowerMAX_OS:*:*) 
    425468        echo powerpc-motorola-powermax 
    426         exit 0 ;; 
     469        exit ;; 
     470    Motorola:*:4.3:PL8-*) 
     471        echo powerpc-harris-powermax 
     472        exit ;; 
     473    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 
     474        echo powerpc-harris-powermax 
     475        exit ;; 
    427476    Night_Hawk:Power_UNIX:*:*) 
    428477        echo powerpc-harris-powerunix 
    429         exit 0 ;; 
     478        exit ;; 
    430479    m88k:CX/UX:7*:*) 
    431480        echo m88k-harris-cxux7 
    432         exit 0 ;; 
     481        exit ;; 
    433482    m88k:*:4*:R4*) 
    434483        echo m88k-motorola-sysv4 
    435         exit 0 ;; 
     484        exit ;; 
    436485    m88k:*:3*:R3*) 
    437486        echo m88k-motorola-sysv3 
    438         exit 0 ;; 
     487        exit ;; 
    439488    AViiON:dgux:*:*) 
    440         # DG/UX returns AViiON for all architectures 
    441         UNAME_PROCESSOR=`/usr/bin/uname -p` 
     489        # DG/UX returns AViiON for all architectures 
     490        UNAME_PROCESSOR=`/usr/bin/uname -p` 
    442491        if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] 
    443492        then 
     
    452501            echo i586-dg-dgux${UNAME_RELEASE} 
    453502        fi 
    454         exit 0 ;; 
     503        exit ;; 
    455504    M88*:DolphinOS:*:*) # DolphinOS (SVR3) 
    456505        echo m88k-dolphin-sysv3 
    457         exit 0 ;; 
     506        exit ;; 
    458507    M88*:*:R3*:*) 
    459508        # Delta 88k system running SVR3 
    460509        echo m88k-motorola-sysv3 
    461         exit 0 ;; 
     510        exit ;; 
    462511    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 
    463512        echo m88k-tektronix-sysv3 
    464         exit 0 ;; 
     513        exit ;; 
    465514    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 
    466515        echo m68k-tektronix-bsd 
    467         exit 0 ;; 
     516        exit ;; 
    468517    *:IRIX*:*:*) 
    469518        echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 
    470         exit 0 ;; 
     519        exit ;; 
    471520    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 
    472         echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id 
    473         exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX ' 
     521        echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id 
     522        exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX ' 
    474523    i*86:AIX:*:*) 
    475524        echo i386-ibm-aix 
    476         exit 0 ;; 
     525        exit ;; 
    477526    ia64:AIX:*:*) 
    478527        if [ -x /usr/bin/oslevel ] ; then 
     
    482531        fi 
    483532        echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 
    484         exit 0 ;; 
     533        exit ;; 
    485534    *:AIX:2:3) 
    486535        if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 
     
    497546                        } 
    498547EOF 
    499                 $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 
    500                 rm -f $dummy.c $dummy 
    501                 echo rs6000-ibm-aix3.2.5 
     548                if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 
     549                then 
     550                        echo "$SYSTEM_NAME" 
     551                else 
     552                        echo rs6000-ibm-aix3.2.5 
     553                fi 
    502554        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 
    503555                echo rs6000-ibm-aix3.2.4 
     
    505557                echo rs6000-ibm-aix3.2 
    506558        fi 
    507         exit 0 ;; 
    508     *:AIX:*:[45]) 
    509         IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` 
     559        exit ;; 
     560    *:AIX:*:[4567]) 
     561        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 
    510562        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 
    511563                IBM_ARCH=rs6000 
     
    519571        fi 
    520572        echo ${IBM_ARCH}-ibm-aix${IBM_REV} 
    521         exit 0 ;; 
     573        exit ;; 
    522574    *:AIX:*:*) 
    523575        echo rs6000-ibm-aix 
    524         exit 0 ;; 
     576        exit ;; 
    525577    ibmrt:4.4BSD:*|romp-ibm:BSD:*) 
    526578        echo romp-ibm-bsd4.4 
    527         exit 0 ;; 
     579        exit ;; 
    528580    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and 
    529581        echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to 
    530         exit 0 ;;                           # report: romp-ibm BSD 4.3 
     582        exit ;;                             # report: romp-ibm BSD 4.3 
    531583    *:BOSX:*:*) 
    532584        echo rs6000-bull-bosx 
    533         exit 0 ;; 
     585        exit ;; 
    534586    DPX/2?00:B.O.S.:*:*) 
    535587        echo m68k-bull-sysv3 
    536         exit 0 ;; 
     588        exit ;; 
    537589    9000/[34]??:4.3bsd:1.*:*) 
    538590        echo m68k-hp-bsd 
    539         exit 0 ;; 
     591        exit ;; 
    540592    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) 
    541593        echo m68k-hp-bsd4.4 
    542         exit 0 ;; 
     594        exit ;; 
    543595    9000/[34678]??:HP-UX:*:*) 
    544596        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 
     
    547599            9000/[34]?? )         HP_ARCH=m68k ;; 
    548600            9000/[678][0-9][0-9]) 
    549               case "${HPUX_REV}" in 
    550                 11.[0-9][0-9]) 
    551                   if [ -x /usr/bin/getconf ]; then 
    552                     sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 
    553                     sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 
    554                     case "${sc_cpu_version}" in 
    555                       523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 
    556                       528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 
    557                       532)                      # CPU_PA_RISC2_0 
    558                         case "${sc_kernel_bits}" in 
    559                           32) HP_ARCH="hppa2.0n" ;; 
    560                           64) HP_ARCH="hppa2.0w" ;; 
    561                         esac ;; 
    562                     esac 
    563                   fi ;; 
    564               esac 
    565               if [ "${HP_ARCH}" = "" ]; then 
    566               eval $set_cc_for_build 
    567               sed 's/^              //' << EOF >$dummy.c 
    568  
    569               #define _HPUX_SOURCE 
    570               #include <stdlib.h> 
    571               #include <unistd.h> 
    572  
    573               int main () 
    574               { 
    575               #if defined(_SC_KERNEL_BITS) 
    576                   long bits = sysconf(_SC_KERNEL_BITS); 
    577               #endif 
    578                   long cpu  = sysconf (_SC_CPU_VERSION); 
    579  
    580                   switch (cpu) 
    581                 { 
    582                 case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 
    583                 case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 
    584                 case CPU_PA_RISC2_0: 
    585               #if defined(_SC_KERNEL_BITS) 
    586                     switch (bits) 
    587                         { 
    588                         case 64: puts ("hppa2.0w"); break; 
    589                         case 32: puts ("hppa2.0n"); break; 
    590                         default: puts ("hppa2.0"); break; 
    591                         } break; 
    592               #else  /* !defined(_SC_KERNEL_BITS) */ 
    593                     puts ("hppa2.0"); break; 
    594               #endif 
    595                 default: puts ("hppa1.0"); break; 
    596                 } 
    597                   exit (0); 
    598               } 
     601                if [ -x /usr/bin/getconf ]; then 
     602                    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` 
     603                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` 
     604                    case "${sc_cpu_version}" in 
     605                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 
     606                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 
     607                      532)                      # CPU_PA_RISC2_0 
     608                        case "${sc_kernel_bits}" in 
     609                          32) HP_ARCH="hppa2.0n" ;; 
     610                          64) HP_ARCH="hppa2.0w" ;; 
     611                          '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20 
     612                        esac ;; 
     613                    esac 
     614                fi 
     615                if [ "${HP_ARCH}" = "" ]; then 
     616                    eval $set_cc_for_build 
     617                    sed 's/^            //' << EOF >$dummy.c 
     618 
     619                #define _HPUX_SOURCE 
     620                #include <stdlib.h> 
     621                #include <unistd.h> 
     622 
     623                int main () 
     624                { 
     625                #if defined(_SC_KERNEL_BITS) 
     626                    long bits = sysconf(_SC_KERNEL_BITS); 
     627                #endif 
     628                    long cpu  = sysconf (_SC_CPU_VERSION); 
     629 
     630                    switch (cpu) 
     631                        { 
     632                        case CPU_PA_RISC1_0: puts ("hppa1.0"); break; 
     633                        case CPU_PA_RISC1_1: puts ("hppa1.1"); break; 
     634                        case CPU_PA_RISC2_0: 
     635                #if defined(_SC_KERNEL_BITS) 
     636                            switch (bits) 
     637                                { 
     638                                case 64: puts ("hppa2.0w"); break; 
     639                                case 32: puts ("hppa2.0n"); break; 
     640                                default: puts ("hppa2.0"); break; 
     641                                } break; 
     642                #else  /* !defined(_SC_KERNEL_BITS) */ 
     643                            puts ("hppa2.0"); break; 
     644                #endif 
     645                        default: puts ("hppa1.0"); break; 
     646                        } 
     647                    exit (0); 
     648                } 
    599649EOF 
    600             (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` 
    601             if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi 
    602             rm -f $dummy.c $dummy 
    603         fi ;; 
     650                    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` 
     651                    test -z "$HP_ARCH" && HP_ARCH=hppa 
     652                fi ;; 
    604653        esac 
     654        if [ ${HP_ARCH} = "hppa2.0w" ] 
     655        then 
     656            eval $set_cc_for_build 
     657 
     658            # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating 
     659            # 32-bit code.  hppa64-hp-hpux* has the same kernel and a compiler 
     660            # generating 64-bit code.  GNU and HP use different nomenclature: 
     661            # 
     662            # $ CC_FOR_BUILD=cc ./config.guess 
     663            # => hppa2.0w-hp-hpux11.23 
     664            # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess 
     665            # => hppa64-hp-hpux11.23 
     666 
     667            if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | 
     668                grep -q __LP64__ 
     669            then 
     670                HP_ARCH="hppa2.0w" 
     671            else 
     672                HP_ARCH="hppa64" 
     673            fi 
     674        fi 
    605675        echo ${HP_ARCH}-hp-hpux${HPUX_REV} 
    606         exit 0 ;; 
     676        exit ;; 
    607677    ia64:HP-UX:*:*) 
    608678        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` 
    609679        echo ia64-hp-hpux${HPUX_REV} 
    610         exit 0 ;; 
     680        exit ;; 
    611681    3050*:HI-UX:*:*) 
    612682        eval $set_cc_for_build 
     
    636706        } 
    637707EOF 
    638         $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 
    639         rm -f $dummy.c $dummy 
     708        $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && 
     709                { echo "$SYSTEM_NAME"; exit; } 
    640710        echo unknown-hitachi-hiuxwe2 
    641         exit 0 ;; 
     711        exit ;; 
    642712    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) 
    643713        echo hppa1.1-hp-bsd 
    644         exit 0 ;; 
     714        exit ;; 
    645715    9000/8??:4.3bsd:*:*) 
    646716        echo hppa1.0-hp-bsd 
    647         exit 0 ;; 
     717        exit ;; 
    648718    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) 
    649719        echo hppa1.0-hp-mpeix 
    650         exit 0 ;; 
     720        exit ;; 
    651721    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) 
    652722        echo hppa1.1-hp-osf 
    653         exit 0 ;; 
     723        exit ;; 
    654724    hp8??:OSF1:*:*) 
    655725        echo hppa1.0-hp-osf 
    656         exit 0 ;; 
     726        exit ;; 
    657727    i*86:OSF1:*:*) 
    658728        if [ -x /usr/sbin/sysversion ] ; then 
     
    661731            echo ${UNAME_MACHINE}-unknown-osf1 
    662732        fi 
    663         exit 0 ;; 
     733        exit ;; 
    664734    parisc*:Lites*:*:*) 
    665735        echo hppa1.1-hp-lites 
    666         exit 0 ;; 
    667     hppa*:OpenBSD:*:*) 
    668         echo hppa-unknown-openbsd 
    669         exit 0 ;; 
     736        exit ;; 
    670737    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) 
    671738        echo c1-convex-bsd 
    672         exit 0 ;; 
     739        exit ;; 
    673740    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) 
    674741        if getsysinfo -f scalar_acc 
     
    676743        else echo c2-convex-bsd 
    677744        fi 
    678         exit 0 ;; 
     745        exit ;; 
    679746    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) 
    680747        echo c34-convex-bsd 
    681         exit 0 ;; 
     748        exit ;; 
    682749    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) 
    683750        echo c38-convex-bsd 
    684         exit 0 ;; 
     751        exit ;; 
    685752    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) 
    686753        echo c4-convex-bsd 
    687         exit 0 ;; 
    688     CRAY*X-MP:*:*:*) 
    689         echo xmp-cray-unicos 
    690         exit 0 ;; 
     754        exit ;; 
    691755    CRAY*Y-MP:*:*:*) 
    692756        echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 
    693         exit 0 ;; 
     757        exit ;; 
    694758    CRAY*[A-Z]90:*:*:*) 
    695759        echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ 
     
    697761              -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ 
    698762              -e 's/\.[^.]*$/.X/' 
    699         exit 0 ;; 
     763        exit ;; 
    700764    CRAY*TS:*:*:*) 
    701765        echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 
    702         exit 0 ;; 
    703     CRAY*T3D:*:*:*) 
    704         echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 
    705         exit 0 ;; 
     766        exit ;; 
    706767    CRAY*T3E:*:*:*) 
    707768        echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 
    708         exit 0 ;; 
     769        exit ;; 
    709770    CRAY*SV1:*:*:*) 
    710771        echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 
    711         exit 0 ;; 
    712     CRAY-2:*:*:*) 
    713         echo cray2-cray-unicos 
    714         exit 0 ;; 
     772        exit ;; 
     773    *:UNICOS/mp:*:*) 
     774        echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 
     775        exit ;; 
    715776    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) 
    716777        FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 
    717         FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 
    718         FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 
    719         echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 
    720         exit 0 ;; 
    721     hp300:OpenBSD:*:*) 
    722         echo m68k-unknown-openbsd${UNAME_RELEASE} 
    723         exit 0 ;; 
     778        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 
     779        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` 
     780        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 
     781        exit ;; 
     782    5000:UNIX_System_V:4.*:*) 
     783        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` 
     784        FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` 
     785        echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" 
     786        exit ;; 
    724787    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) 
    725788        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} 
    726         exit 0 ;; 
     789        exit ;; 
    727790    sparc*:BSD/OS:*:*) 
    728791        echo sparc-unknown-bsdi${UNAME_RELEASE} 
    729         exit 0 ;; 
     792        exit ;; 
    730793    *:BSD/OS:*:*) 
    731794        echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} 
    732         exit 0 ;; 
     795        exit ;; 
    733796    *:FreeBSD:*:*) 
    734         echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 
    735         exit 0 ;; 
    736     *:OpenBSD:*:*) 
    737         echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 
    738         exit 0 ;; 
     797        UNAME_PROCESSOR=`/usr/bin/uname -p` 
     798        case ${UNAME_PROCESSOR} in 
     799            amd64) 
     800                echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 
     801            *) 
     802                echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; 
     803        esac 
     804        exit ;; 
    739805    i*:CYGWIN*:*) 
    740806        echo ${UNAME_MACHINE}-pc-cygwin 
    741         exit 0 ;; 
    742     i*:MINGW*:*) 
     807        exit ;; 
     808    *:MINGW*:*) 
    743809        echo ${UNAME_MACHINE}-pc-mingw32 
    744         exit 0 ;; 
     810        exit ;; 
     811    i*:MSYS*:*) 
     812        echo ${UNAME_MACHINE}-pc-msys 
     813        exit ;; 
     814    i*:windows32*:*) 
     815        # uname -m includes "-pc" on this system. 
     816        echo ${UNAME_MACHINE}-mingw32 
     817        exit ;; 
    745818    i*:PW*:*) 
    746819        echo ${UNAME_MACHINE}-pc-pw32 
    747         exit 0 ;; 
     820        exit ;; 
     821    *:Interix*:*) 
     822        case ${UNAME_MACHINE} in 
     823            x86) 
     824                echo i586-pc-interix${UNAME_RELEASE} 
     825                exit ;; 
     826            authenticamd | genuineintel | EM64T) 
     827                echo x86_64-unknown-interix${UNAME_RELEASE} 
     828                exit ;; 
     829            IA64) 
     830                echo ia64-unknown-interix${UNAME_RELEASE} 
     831                exit ;; 
     832        esac ;; 
     833    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) 
     834        echo i${UNAME_MACHINE}-pc-mks 
     835        exit ;; 
     836    8664:Windows_NT:*) 
     837        echo x86_64-pc-mks 
     838        exit ;; 
    748839    i*:Windows_NT*:* | Pentium*:Windows_NT*:*) 
    749840        # How do we know it's Interix rather than the generic POSIX subsystem? 
    750841        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we 
    751842        # UNAME_MACHINE based on the output of uname instead of i386? 
    752         echo i386-pc-interix 
    753         exit 0 ;; 
     843        echo i586-pc-interix 
     844        exit ;; 
    754845    i*:UWIN*:*) 
    755846        echo ${UNAME_MACHINE}-pc-uwin 
    756         exit 0 ;; 
     847        exit ;; 
     848    amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) 
     849        echo x86_64-unknown-cygwin 
     850        exit ;; 
    757851    p*:CYGWIN*:*) 
    758852        echo powerpcle-unknown-cygwin 
    759         exit 0 ;; 
     853        exit ;; 
    760854    prep*:SunOS:5.*:*) 
    761855        echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 
    762         exit 0 ;; 
     856        exit ;; 
    763857    *:GNU:*:*) 
     858        # the GNU system 
    764859        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` 
    765         exit 0 ;; 
     860        exit ;; 
     861    *:GNU/*:*:*) 
     862        # other systems with GNU libc and userland 
     863        echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu 
     864        exit ;; 
    766865    i*86:Minix:*:*) 
    767866        echo ${UNAME_MACHINE}-pc-minix 
    768         exit 0 ;; 
    769     arm*:Linux:*:*) 
     867        exit ;; 
     868    aarch64:Linux:*:*) 
    770869        echo ${UNAME_MACHINE}-unknown-linux-gnu 
    771         exit 0 ;; 
    772     ia64:Linux:*:*) 
    773         echo ${UNAME_MACHINE}-unknown-linux 
    774         exit 0 ;; 
    775     m68*:Linux:*:*) 
     870        exit ;; 
     871    aarch64_be:Linux:*:*) 
     872        UNAME_MACHINE=aarch64_be 
    776873        echo ${UNAME_MACHINE}-unknown-linux-gnu 
    777         exit 0 ;; 
    778     mips:Linux:*:*) 
    779         case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in 
    780           big)    echo mips-unknown-linux-gnu && exit 0 ;; 
    781           little) echo mipsel-unknown-linux-gnu && exit 0 ;; 
    782         esac 
    783         ;; 
    784     ppc:Linux:*:*) 
    785         echo powerpc-unknown-linux-gnu 
    786         exit 0 ;; 
    787     ppc64:Linux:*:*) 
    788         echo powerpc64-unknown-linux-gnu 
    789         exit 0 ;; 
     874        exit ;; 
    790875    alpha:Linux:*:*) 
    791876        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in 
     
    797882          EV67)  UNAME_MACHINE=alphaev67 ;; 
    798883          EV68*) UNAME_MACHINE=alphaev68 ;; 
    799         esac 
    800         objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null 
     884        esac 
     885        objdump --private-headers /bin/sh | grep -q ld.so.1 
    801886        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi 
    802887        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} 
    803         exit 0 ;; 
     888        exit ;; 
     889    arm*:Linux:*:*) 
     890        eval $set_cc_for_build 
     891        if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ 
     892            | grep -q __ARM_EABI__ 
     893        then 
     894            echo ${UNAME_MACHINE}-unknown-linux-gnu 
     895        else 
     896            if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ 
     897                | grep -q __ARM_PCS_VFP 
     898            then 
     899                echo ${UNAME_MACHINE}-unknown-linux-gnueabi 
     900            else 
     901                echo ${UNAME_MACHINE}-unknown-linux-gnueabihf 
     902            fi 
     903        fi 
     904        exit ;; 
     905    avr32*:Linux:*:*) 
     906        echo ${UNAME_MACHINE}-unknown-linux-gnu 
     907        exit ;; 
     908    cris:Linux:*:*) 
     909        echo ${UNAME_MACHINE}-axis-linux-gnu 
     910        exit ;; 
     911    crisv32:Linux:*:*) 
     912        echo ${UNAME_MACHINE}-axis-linux-gnu 
     913        exit ;; 
     914    frv:Linux:*:*) 
     915        echo ${UNAME_MACHINE}-unknown-linux-gnu 
     916        exit ;; 
     917    hexagon:Linux:*:*) 
     918        echo ${UNAME_MACHINE}-unknown-linux-gnu 
     919        exit ;; 
     920    i*86:Linux:*:*) 
     921        LIBC=gnu 
     922        eval $set_cc_for_build 
     923        sed 's/^        //' << EOF >$dummy.c 
     924        #ifdef __dietlibc__ 
     925        LIBC=dietlibc 
     926        #endif 
     927EOF 
     928        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` 
     929        echo "${UNAME_MACHINE}-pc-linux-${LIBC}" 
     930        exit ;; 
     931    ia64:Linux:*:*) 
     932        echo ${UNAME_MACHINE}-unknown-linux-gnu 
     933        exit ;; 
     934    m32r*:Linux:*:*) 
     935        echo ${UNAME_MACHINE}-unknown-linux-gnu 
     936        exit ;; 
     937    m68*:Linux:*:*) 
     938        echo ${UNAME_MACHINE}-unknown-linux-gnu 
     939        exit ;; 
     940    mips:Linux:*:* | mips64:Linux:*:*) 
     941        eval $set_cc_for_build 
     942        sed 's/^        //' << EOF >$dummy.c 
     943        #undef CPU 
     944        #undef ${UNAME_MACHINE} 
     945        #undef ${UNAME_MACHINE}el 
     946        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) 
     947        CPU=${UNAME_MACHINE}el 
     948        #else 
     949        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) 
     950        CPU=${UNAME_MACHINE} 
     951        #else 
     952        CPU= 
     953        #endif 
     954        #endif 
     955EOF 
     956        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` 
     957        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } 
     958        ;; 
     959    or32:Linux:*:*) 
     960        echo ${UNAME_MACHINE}-unknown-linux-gnu 
     961        exit ;; 
     962    padre:Linux:*:*) 
     963        echo sparc-unknown-linux-gnu 
     964        exit ;; 
     965    parisc64:Linux:*:* | hppa64:Linux:*:*) 
     966        echo hppa64-unknown-linux-gnu 
     967        exit ;; 
    804968    parisc:Linux:*:* | hppa:Linux:*:*) 
    805969        # Look for CPU level 
     
    809973          *)    echo hppa-unknown-linux-gnu ;; 
    810974        esac 
    811         exit 0 ;; 
    812     parisc64:Linux:*:* | hppa64:Linux:*:*) 
    813         echo hppa64-unknown-linux-gnu 
    814         exit 0 ;; 
     975        exit ;; 
     976    ppc64:Linux:*:*) 
     977        echo powerpc64-unknown-linux-gnu 
     978        exit ;; 
     979    ppc:Linux:*:*) 
     980        echo powerpc-unknown-linux-gnu 
     981        exit ;; 
    815982    s390:Linux:*:* | s390x:Linux:*:*) 
    816983        echo ${UNAME_MACHINE}-ibm-linux 
    817         exit 0 ;; 
     984        exit ;; 
     985    sh64*:Linux:*:*) 
     986        echo ${UNAME_MACHINE}-unknown-linux-gnu 
     987        exit ;; 
    818988    sh*:Linux:*:*) 
    819989        echo ${UNAME_MACHINE}-unknown-linux-gnu 
    820         exit 0 ;; 
     990        exit ;; 
    821991    sparc:Linux:*:* | sparc64:Linux:*:*) 
    822992        echo ${UNAME_MACHINE}-unknown-linux-gnu 
    823         exit 0 ;; 
     993        exit ;; 
     994    tile*:Linux:*:*) 
     995        echo ${UNAME_MACHINE}-unknown-linux-gnu 
     996        exit ;; 
     997    vax:Linux:*:*) 
     998        echo ${UNAME_MACHINE}-dec-linux-gnu 
     999        exit ;; 
    8241000    x86_64:Linux:*:*) 
    825         echo x86_64-unknown-linux-gnu 
    826         exit 0 ;; 
    827     i*86:Linux:*:*) 
    828         # The BFD linker knows what the default object file format is, so 
    829         # first see if it will tell us. cd to the root directory to prevent 
    830         # problems with other programs or directories called `ld' in the path. 
    831         ld_supported_targets=`cd /; ld --help 2>&1 \ 
    832                          | sed -ne '/supported targets:/!d 
    833                                     s/[         ][      ]*/ /g 
    834                                     s/.*supported targets: *// 
    835                                     s/ .*// 
    836                                     p'` 
    837         case "$ld_supported_targets" in 
    838           elf32-i386) 
    839                 TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" 
    840                 ;; 
    841           a.out-i386-linux) 
    842                 echo "${UNAME_MACHINE}-pc-linux-gnuaout" 
    843                 exit 0 ;;                
    844           coff-i386) 
    845                 echo "${UNAME_MACHINE}-pc-linux-gnucoff" 
    846                 exit 0 ;; 
    847           "") 
    848                 # Either a pre-BFD a.out linker (linux-gnuoldld) or 
    849                 # one that does not give us useful --help. 
    850                 echo "${UNAME_MACHINE}-pc-linux-gnuoldld" 
    851                 exit 0 ;; 
    852         esac 
    853         # Determine whether the default compiler is a.out or elf 
    854         eval $set_cc_for_build 
    855         cat >$dummy.c <<EOF 
    856 #include <features.h> 
    857 #ifdef __cplusplus 
    858 #include <stdio.h>  /* for printf() prototype */ 
    859         int main (int argc, char *argv[]) { 
    860 #else 
    861         int main (argc, argv) int argc; char *argv[]; { 
    862 #endif 
    863 #ifdef __ELF__ 
    864 # ifdef __GLIBC__ 
    865 #  if __GLIBC__ >= 2 
    866     printf ("%s-pc-linux-gnu\n", argv[1]); 
    867 #  else 
    868     printf ("%s-pc-linux-gnulibc1\n", argv[1]); 
    869 #  endif 
    870 # else 
    871    printf ("%s-pc-linux-gnulibc1\n", argv[1]); 
    872 # endif 
    873 #else 
    874   printf ("%s-pc-linux-gnuaout\n", argv[1]); 
    875 #endif 
    876   return 0; 
    877 } 
    878 EOF 
    879         $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 
    880         rm -f $dummy.c $dummy 
    881         test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 
    882         ;; 
     1001        echo ${UNAME_MACHINE}-unknown-linux-gnu 
     1002        exit ;; 
     1003    xtensa*:Linux:*:*) 
     1004        echo ${UNAME_MACHINE}-unknown-linux-gnu 
     1005        exit ;; 
    8831006    i*86:DYNIX/ptx:4*:*) 
    8841007        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. 
     
    8861009        # sysname and nodename. 
    8871010        echo i386-sequent-sysv4 
    888         exit 0 ;; 
     1011        exit ;; 
    8891012    i*86:UNIX_SV:4.2MP:2.*) 
    890         # Unixware is an offshoot of SVR4, but it has its own version 
    891         # number series starting with 2... 
    892         # I am not positive that other SVR4 systems won't match this, 
     1013        # Unixware is an offshoot of SVR4, but it has its own version 
     1014        # number series starting with 2... 
     1015        # I am not positive that other SVR4 systems won't match this, 
    8931016        # I just have to hope.  -- rms. 
    894         # Use sysv4.2uw... so that sysv4* matches it. 
     1017        # Use sysv4.2uw... so that sysv4* matches it. 
    8951018        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} 
    896         exit 0 ;; 
     1019        exit ;; 
     1020    i*86:OS/2:*:*) 
     1021        # If we were able to find `uname', then EMX Unix compatibility 
     1022        # is probably installed. 
     1023        echo ${UNAME_MACHINE}-pc-os2-emx 
     1024        exit ;; 
     1025    i*86:XTS-300:*:STOP) 
     1026        echo ${UNAME_MACHINE}-unknown-stop 
     1027        exit ;; 
     1028    i*86:atheos:*:*) 
     1029        echo ${UNAME_MACHINE}-unknown-atheos 
     1030        exit ;; 
     1031    i*86:syllable:*:*) 
     1032        echo ${UNAME_MACHINE}-pc-syllable 
     1033        exit ;; 
     1034    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) 
     1035        echo i386-unknown-lynxos${UNAME_RELEASE} 
     1036        exit ;; 
     1037    i*86:*DOS:*:*) 
     1038        echo ${UNAME_MACHINE}-pc-msdosdjgpp 
     1039        exit ;; 
    8971040    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) 
    8981041        UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` 
     
    9021045                echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} 
    9031046        fi 
    904         exit 0 ;; 
    905     i*86:*:5:[78]*) 
     1047        exit ;; 
     1048    i*86:*:5:[678]*) 
     1049        # UnixWare 7.x, OpenUNIX and OpenServer 6. 
    9061050        case `/bin/uname -X | grep "^Machine"` in 
    9071051            *486*)           UNAME_MACHINE=i486 ;; 
     
    9101054        esac 
    9111055        echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} 
    912         exit 0 ;; 
     1056        exit ;; 
    9131057    i*86:*:3.2:*) 
    9141058        if test -f /usr/options/cb.name; then 
     
    9161060                echo ${UNAME_MACHINE}-pc-isc$UNAME_REL 
    9171061        elif /bin/uname -X 2>/dev/null >/dev/null ; then 
    918                 UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` 
    919                 (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 
    920                 (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ 
     1062                UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` 
     1063                (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 
     1064                (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ 
    9211065                        && UNAME_MACHINE=i586 
    922                 (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ 
     1066                (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ 
    9231067                        && UNAME_MACHINE=i686 
    924                 (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ 
     1068                (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ 
    9251069                        && UNAME_MACHINE=i686 
    9261070                echo ${UNAME_MACHINE}-pc-sco$UNAME_REL 
     
    9281072                echo ${UNAME_MACHINE}-pc-sysv32 
    9291073        fi 
    930         exit 0 ;; 
    931     i*86:*DOS:*:*) 
    932         echo ${UNAME_MACHINE}-pc-msdosdjgpp 
    933         exit 0 ;; 
     1074        exit ;; 
    9341075    pc:*:*:*) 
    9351076        # Left here for compatibility: 
    936         # uname -m prints for DJGPP always 'pc', but it prints nothing about 
    937         # the processor, so we play safe by assuming i386. 
    938         echo i386-pc-msdosdjgpp 
    939         exit 0 ;; 
     1077        # uname -m prints for DJGPP always 'pc', but it prints nothing about 
     1078        # the processor, so we play safe by assuming i586. 
     1079        # Note: whatever this is, it MUST be the same as what config.sub 
     1080        # prints for the "djgpp" host, or else GDB configury will decide that 
     1081        # this is a cross-build. 
     1082        echo i586-pc-msdosdjgpp 
     1083        exit ;; 
    9401084    Intel:Mach:3*:*) 
    9411085        echo i386-pc-mach3 
    942         exit 0 ;; 
     1086        exit ;; 
    9431087    paragon:*:*:*) 
    9441088        echo i860-intel-osf1 
    945         exit 0 ;; 
     1089        exit ;; 
    9461090    i860:*:4.*:*) # i860-SVR4 
    9471091        if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then 
     
    9501094          echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4 
    9511095        fi 
    952         exit 0 ;; 
     1096        exit ;; 
    9531097    mini*:CTIX:SYS*5:*) 
    9541098        # "miniframe" 
    9551099        echo m68010-convergent-sysv 
    956         exit 0 ;; 
    957     M68*:*:R3V[567]*:*) 
    958         test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; 
    959     3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) 
     1100        exit ;; 
     1101    mc68k:UNIX:SYSTEM5:3.51m) 
     1102        echo m68k-convergent-sysv 
     1103        exit ;; 
     1104    M680?0:D-NIX:5.3:*) 
     1105        echo m68k-diab-dnix 
     1106        exit ;; 
     1107    M68*:*:R3V[5678]*:*) 
     1108        test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 
     1109    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) 
    9601110        OS_REL='' 
    9611111        test -r /etc/.relid \ 
    9621112        && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 
    9631113        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 
    964           && echo i486-ncr-sysv4.3${OS_REL} && exit 0 
     1114          && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 
    9651115        /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 
    966           && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; 
     1116          && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 
    9671117    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) 
    968         /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 
    969           && echo i486-ncr-sysv4 && exit 0 ;; 
     1118        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 
     1119          && { echo i486-ncr-sysv4; exit; } ;; 
     1120    NCR*:*:4.2:* | MPRAS*:*:4.2:*) 
     1121        OS_REL='.3' 
     1122        test -r /etc/.relid \ 
     1123            && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` 
     1124        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ 
     1125            && { echo i486-ncr-sysv4.3${OS_REL}; exit; } 
     1126        /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ 
     1127            && { echo i586-ncr-sysv4.3${OS_REL}; exit; } 
     1128        /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ 
     1129            && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 
    9701130    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) 
    9711131        echo m68k-unknown-lynxos${UNAME_RELEASE} 
    972         exit 0 ;; 
     1132        exit ;; 
    9731133    mc68030:UNIX_System_V:4.*:*) 
    9741134        echo m68k-atari-sysv4 
    975         exit 0 ;; 
    976     i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) 
    977         echo i386-unknown-lynxos${UNAME_RELEASE} 
    978         exit 0 ;; 
     1135        exit ;; 
    9791136    TSUNAMI:LynxOS:2.*:*) 
    9801137        echo sparc-unknown-lynxos${UNAME_RELEASE} 
    981         exit 0 ;; 
     1138        exit ;; 
    9821139    rs6000:LynxOS:2.*:*) 
    9831140        echo rs6000-unknown-lynxos${UNAME_RELEASE} 
    984         exit 0 ;; 
    985     PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) 
     1141        exit ;; 
     1142    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) 
    9861143        echo powerpc-unknown-lynxos${UNAME_RELEASE} 
    987         exit 0 ;; 
     1144        exit ;; 
    9881145    SM[BE]S:UNIX_SV:*:*) 
    9891146        echo mips-dde-sysv${UNAME_RELEASE} 
    990         exit 0 ;; 
     1147        exit ;; 
    9911148    RM*:ReliantUNIX-*:*:*) 
    9921149        echo mips-sni-sysv4 
    993         exit 0 ;; 
     1150        exit ;; 
    9941151    RM*:SINIX-*:*:*) 
    9951152        echo mips-sni-sysv4 
    996         exit 0 ;; 
     1153        exit ;; 
    9971154    *:SINIX-*:*:*) 
    9981155        if uname -p 2>/dev/null >/dev/null ; then 
     
    10021159                echo ns32k-sni-sysv 
    10031160        fi 
    1004         exit 0 ;; 
    1005     PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 
    1006                       # says <Richard.M.Bartel@ccMail.Census.GOV> 
    1007         echo i586-unisys-sysv4 
    1008         exit 0 ;; 
     1161        exit ;; 
     1162    PENTIUM:*:4.0*:*)   # Unisys `ClearPath HMP IX 4000' SVR4/MP effort 
     1163                        # says <Richard.M.Bartel@ccMail.Census.GOV> 
     1164        echo i586-unisys-sysv4 
     1165        exit ;; 
    10091166    *:UNIX_System_V:4*:FTX*) 
    10101167        # From Gerald Hewes <hewes@openmarket.com>. 
    10111168        # How about differentiating between stratus architectures? -djm 
    10121169        echo hppa1.1-stratus-sysv4 
    1013         exit 0 ;; 
     1170        exit ;; 
    10141171    *:*:*:FTX*) 
    10151172        # From seanf@swdc.stratus.com. 
    10161173        echo i860-stratus-sysv4 
    1017         exit 0 ;; 
     1174        exit ;; 
     1175    i*86:VOS:*:*) 
     1176        # From Paul.Green@stratus.com. 
     1177        echo ${UNAME_MACHINE}-stratus-vos 
     1178        exit ;; 
    10181179    *:VOS:*:*) 
    10191180        # From Paul.Green@stratus.com. 
    10201181        echo hppa1.1-stratus-vos 
    1021         exit 0 ;; 
     1182        exit ;; 
    10221183    mc68*:A/UX:*:*) 
    10231184        echo m68k-apple-aux${UNAME_RELEASE} 
    1024         exit 0 ;; 
     1185        exit ;; 
    10251186    news*:NEWS-OS:6*:*) 
    10261187        echo mips-sony-newsos6 
    1027         exit 0 ;; 
     1188        exit ;; 
    10281189    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) 
    10291190        if [ -d /usr/nec ]; then 
    1030                 echo mips-nec-sysv${UNAME_RELEASE} 
     1191                echo mips-nec-sysv${UNAME_RELEASE} 
    10311192        else 
    1032                 echo mips-unknown-sysv${UNAME_RELEASE} 
    1033         fi 
    1034         exit 0 ;; 
     1193                echo mips-unknown-sysv${UNAME_RELEASE} 
     1194        fi 
     1195        exit ;; 
    10351196    BeBox:BeOS:*:*)     # BeOS running on hardware made by Be, PPC only. 
    10361197        echo powerpc-be-beos 
    1037         exit 0 ;; 
     1198        exit ;; 
    10381199    BeMac:BeOS:*:*)     # BeOS running on Mac or Mac clone, PPC only. 
    10391200        echo powerpc-apple-beos 
    1040         exit 0 ;; 
     1201        exit ;; 
    10411202    BePC:BeOS:*:*)      # BeOS running on Intel PC compatible. 
    10421203        echo i586-pc-beos 
    1043         exit 0 ;; 
     1204        exit ;; 
     1205    BePC:Haiku:*:*)     # Haiku running on Intel PC compatible. 
     1206        echo i586-pc-haiku 
     1207        exit ;; 
    10441208    SX-4:SUPER-UX:*:*) 
    10451209        echo sx4-nec-superux${UNAME_RELEASE} 
    1046         exit 0 ;; 
     1210        exit ;; 
    10471211    SX-5:SUPER-UX:*:*) 
    10481212        echo sx5-nec-superux${UNAME_RELEASE} 
    1049         exit 0 ;; 
     1213        exit ;; 
     1214    SX-6:SUPER-UX:*:*) 
     1215        echo sx6-nec-superux${UNAME_RELEASE} 
     1216        exit ;; 
     1217    SX-7:SUPER-UX:*:*) 
     1218        echo sx7-nec-superux${UNAME_RELEASE} 
     1219        exit ;; 
     1220    SX-8:SUPER-UX:*:*) 
     1221        echo sx8-nec-superux${UNAME_RELEASE} 
     1222        exit ;; 
     1223    SX-8R:SUPER-UX:*:*) 
     1224        echo sx8r-nec-superux${UNAME_RELEASE} 
     1225        exit ;; 
    10501226    Power*:Rhapsody:*:*) 
    10511227        echo powerpc-apple-rhapsody${UNAME_RELEASE} 
    1052         exit 0 ;; 
     1228        exit ;; 
    10531229    *:Rhapsody:*:*) 
    10541230        echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} 
    1055         exit 0 ;; 
     1231        exit ;; 
    10561232    *:Darwin:*:*) 
    1057         echo `uname -p`-apple-darwin${UNAME_RELEASE} 
    1058         exit 0 ;; 
     1233        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown 
     1234        case $UNAME_PROCESSOR in 
     1235            i386) 
     1236                eval $set_cc_for_build 
     1237                if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then 
     1238                  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ 
     1239                      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ 
     1240                      grep IS_64BIT_ARCH >/dev/null 
     1241                  then 
     1242                      UNAME_PROCESSOR="x86_64" 
     1243                  fi 
     1244                fi ;; 
     1245            unknown) UNAME_PROCESSOR=powerpc ;; 
     1246        esac 
     1247        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} 
     1248        exit ;; 
    10591249    *:procnto*:*:* | *:QNX:[0123456789]*:*) 
    1060         if test "${UNAME_MACHINE}" = "x86pc"; then 
     1250        UNAME_PROCESSOR=`uname -p` 
     1251        if test "$UNAME_PROCESSOR" = "x86"; then 
     1252                UNAME_PROCESSOR=i386 
    10611253                UNAME_MACHINE=pc 
    10621254        fi 
    1063         echo `uname -p`-${UNAME_MACHINE}-nto-qnx 
    1064         exit 0 ;; 
     1255        echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} 
     1256        exit ;; 
    10651257    *:QNX:*:4*) 
    10661258        echo i386-pc-qnx 
    1067         exit 0 ;; 
    1068     NSR-[KW]:NONSTOP_KERNEL:*:*) 
     1259        exit ;; 
     1260    NEO-?:NONSTOP_KERNEL:*:*) 
     1261        echo neo-tandem-nsk${UNAME_RELEASE} 
     1262        exit ;; 
     1263    NSE-*:NONSTOP_KERNEL:*:*) 
     1264        echo nse-tandem-nsk${UNAME_RELEASE} 
     1265        exit ;; 
     1266    NSR-?:NONSTOP_KERNEL:*:*) 
    10691267        echo nsr-tandem-nsk${UNAME_RELEASE} 
    1070         exit 0 ;; 
     1268        exit ;; 
    10711269    *:NonStop-UX:*:*) 
    10721270        echo mips-compaq-nonstopux 
    1073         exit 0 ;; 
     1271        exit ;; 
    10741272    BS2000:POSIX*:*:*) 
    10751273        echo bs2000-siemens-sysv 
    1076         exit 0 ;; 
     1274        exit ;; 
    10771275    DS/*:UNIX_System_V:*:*) 
    10781276        echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} 
    1079         exit 0 ;; 
     1277        exit ;; 
    10801278    *:Plan9:*:*) 
    10811279        # "uname -m" is not consistent, so use $cputype instead. 386 
     
    10881286        fi 
    10891287        echo ${UNAME_MACHINE}-unknown-plan9 
    1090         exit 0 ;; 
    1091     i*86:OS/2:*:*) 
    1092         # If we were able to find `uname', then EMX Unix compatibility 
    1093         # is probably installed. 
    1094         echo ${UNAME_MACHINE}-pc-os2-emx 
    1095         exit 0 ;; 
     1288        exit ;; 
    10961289    *:TOPS-10:*:*) 
    10971290        echo pdp10-unknown-tops10 
    1098         exit 0 ;; 
     1291        exit ;; 
    10991292    *:TENEX:*:*) 
    11001293        echo pdp10-unknown-tenex 
    1101         exit 0 ;; 
     1294        exit ;; 
    11021295    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) 
    11031296        echo pdp10-dec-tops20 
    1104         exit 0 ;; 
     1297        exit ;; 
    11051298    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) 
    11061299        echo pdp10-xkl-tops20 
    1107         exit 0 ;; 
     1300        exit ;; 
    11081301    *:TOPS-20:*:*) 
    11091302        echo pdp10-unknown-tops20 
    1110         exit 0 ;; 
     1303        exit ;; 
    11111304    *:ITS:*:*) 
    11121305        echo pdp10-unknown-its 
    1113         exit 0 ;; 
    1114     i*86:XTS-300:*:STOP) 
    1115         echo ${UNAME_MACHINE}-unknown-stop 
    1116         exit 0 ;; 
    1117     i*86:atheos:*:*) 
    1118         echo ${UNAME_MACHINE}-unknown-atheos 
    1119         exit 0 ;; 
     1306        exit ;; 
     1307    SEI:*:*:SEIUX) 
     1308        echo mips-sei-seiux${UNAME_RELEASE} 
     1309        exit ;; 
     1310    *:DragonFly:*:*) 
     1311        echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` 
     1312        exit ;; 
     1313    *:*VMS:*:*) 
     1314        UNAME_MACHINE=`(uname -p) 2>/dev/null` 
     1315        case "${UNAME_MACHINE}" in 
     1316            A*) echo alpha-dec-vms ; exit ;; 
     1317            I*) echo ia64-dec-vms ; exit ;; 
     1318            V*) echo vax-dec-vms ; exit ;; 
     1319        esac ;; 
     1320    *:XENIX:*:SysV) 
     1321        echo i386-pc-xenix 
     1322        exit ;; 
     1323    i*86:skyos:*:*) 
     1324        echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' 
     1325        exit ;; 
     1326    i*86:rdos:*:*) 
     1327        echo ${UNAME_MACHINE}-pc-rdos 
     1328        exit ;; 
     1329    i*86:AROS:*:*) 
     1330        echo ${UNAME_MACHINE}-pc-aros 
     1331        exit ;; 
     1332    x86_64:VMkernel:*:*) 
     1333        echo ${UNAME_MACHINE}-unknown-esx 
     1334        exit ;; 
    11201335esac 
    11211336 
     
    11401355  printf ("m68k-sony-newsos%s\n", 
    11411356#ifdef NEWSOS4 
    1142           "4" 
     1357        "4" 
    11431358#else 
    1144           "" 
    1145 #endif 
    1146          ); exit (0); 
     1359        "" 
     1360#endif 
     1361        ); exit (0); 
    11471362#endif 
    11481363#endif 
    11491364 
    11501365#if defined (__arm) && defined (__acorn) && defined (__unix) 
    1151   printf ("arm-acorn-riscix"); exit (0); 
     1366  printf ("arm-acorn-riscix\n"); exit (0); 
    11521367#endif 
    11531368 
     
    12381453EOF 
    12391454 
    1240 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 
    1241 rm -f $dummy.c $dummy 
     1455$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && 
     1456        { echo "$SYSTEM_NAME"; exit; } 
    12421457 
    12431458# Apollos put the system type in the environment. 
    12441459 
    1245 test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } 
     1460test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } 
    12461461 
    12471462# Convex versions that predate uname can use getsysinfo(1) 
     
    12521467    c1*) 
    12531468        echo c1-convex-bsd 
    1254         exit 0 ;; 
     1469        exit ;; 
    12551470    c2*) 
    12561471        if getsysinfo -f scalar_acc 
     
    12581473        else echo c2-convex-bsd 
    12591474        fi 
    1260         exit 0 ;; 
     1475        exit ;; 
    12611476    c34*) 
    12621477        echo c34-convex-bsd 
    1263         exit 0 ;; 
     1478        exit ;; 
    12641479    c38*) 
    12651480        echo c38-convex-bsd 
    1266         exit 0 ;; 
     1481        exit ;; 
    12671482    c4*) 
    12681483        echo c4-convex-bsd 
    1269         exit 0 ;; 
     1484        exit ;; 
    12701485    esac 
    12711486fi 
     
    12781493download the most up to date version of the config scripts from 
    12791494 
    1280     ftp://ftp.gnu.org/pub/gnu/config/ 
     1495  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD 
     1496and 
     1497  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 
    12811498 
    12821499If the version you run ($0) is already up to date, please 
  • pjproject/branches/projects/android/config.sub

    r1948 r4192  
    22# Configuration validation subroutine script. 
    33#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 
    4 #   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. 
    5  
    6 timestamp='2005-04-22' 
     4#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 
     5#   2011, 2012 Free Software Foundation, Inc. 
     6 
     7timestamp='2012-06-17' 
    78 
    89# This file is (in principle) common to ALL GNU software. 
     
    2122# 
    2223# You should have received a copy of the GNU General Public License 
    23 # along with this program; if not, write to the Free Software 
    24 # Foundation, Inc., 59 Temple Place - Suite 330, 
    25 # Boston, MA 02111-1307, USA. 
    26  
     24# along with this program; if not, see <http://www.gnu.org/licenses/>. 
     25# 
    2726# As a special exception to the GNU General Public License, if you 
    2827# distribute this file as part of a program that contains a 
     
    3029# the same distribution terms that you use for the rest of that program. 
    3130 
     31 
    3232# Please send patches to <config-patches@gnu.org>.  Submit a context 
    33 # diff and a properly formatted ChangeLog entry. 
     33# diff and a properly formatted GNU ChangeLog entry. 
    3434# 
    3535# Configuration subroutine to validate and canonicalize a configuration type. 
     
    3737# If it is invalid, we print an error message on stderr and exit with code 1. 
    3838# Otherwise, we print the canonical config type on stdout and succeed. 
     39 
     40# You can get the latest version of this script from: 
     41# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD 
    3942 
    4043# This file is supposed to be the same for all GNU packages 
     
    7174GNU config.sub ($timestamp) 
    7275 
    73 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 
     76Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 
     772001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 
    7478Free Software Foundation, Inc. 
    7579 
     
    8488  case $1 in 
    8589    --time-stamp | --time* | -t ) 
    86        echo "$timestamp" ; exit 0 ;; 
     90       echo "$timestamp" ; exit ;; 
    8791    --version | -v ) 
    88        echo "$version" ; exit 0 ;; 
     92       echo "$version" ; exit ;; 
    8993    --help | --h* | -h ) 
    90        echo "$usage"; exit 0 ;; 
     94       echo "$usage"; exit ;; 
    9195    -- )     # Stop option processing 
    9296       shift; break ;; 
     
    100104       # First pass through any local machine types. 
    101105       echo $1 
    102        exit 0;; 
     106       exit ;; 
    103107 
    104108    * ) 
     
    119123maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 
    120124case $maybe_os in 
    121   nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ 
    122   kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) 
     125  nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ 
     126  linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ 
     127  knetbsd*-gnu* | netbsd*-gnu* | \ 
     128  kopensolaris*-gnu* | \ 
     129  storm-chaos* | os2-emx* | rtmk-nova*) 
    123130    os=-$maybe_os 
    124131    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` 
     132    ;; 
     133  android-linux) 
     134    os=-linux-android 
     135    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown 
    125136    ;; 
    126137  *) 
     
    146157        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ 
    147158        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ 
    148         -apple | -axis | -knuth | -cray) 
     159        -apple | -axis | -knuth | -cray | -microblaze) 
    149160                os= 
    150161                basic_machine=$1 
     162                ;; 
     163        -bluegene*) 
     164                os=-cnk 
    151165                ;; 
    152166        -sim | -cisco | -oki | -wec | -winbond) 
     
    164178                basic_machine=$1 
    165179                ;; 
    166         -chorusrdb) 
    167                 os=-chorusrdb 
     180        -chorusrdb) 
     181                os=-chorusrdb 
    168182                basic_machine=$1 
    169                 ;; 
     183                ;; 
    170184        -hiux*) 
    171185                os=-hiuxwe2 
     186                ;; 
     187        -sco6) 
     188                os=-sco5v6 
     189                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 
    172190                ;; 
    173191        -sco5) 
     
    187205                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 
    188206                ;; 
     207        -sco5v6*) 
     208                # Don't forget version if it is 3.2v4 or newer. 
     209                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 
     210                ;; 
    189211        -sco*) 
    190212                os=-sco3.2v2 
     
    203225        -isc*) 
    204226                basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` 
     227                ;; 
     228        -lynx*178) 
     229                os=-lynxos178 
     230                ;; 
     231        -lynx*5) 
     232                os=-lynxos5 
    205233                ;; 
    206234        -lynx*) 
     
    228256        1750a | 580 \ 
    229257        | a29k \ 
     258        | aarch64 | aarch64_be \ 
    230259        | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ 
    231260        | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ 
    232261        | am33_2.0 \ 
    233         | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ 
     262        | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ 
     263        | be32 | be64 \ 
    234264        | bfin \ 
    235265        | c4x | clipper \ 
    236266        | d10v | d30v | dlx | dsp16xx \ 
    237         | fr30 | frv \ 
     267        | epiphany \ 
     268        | fido | fr30 | frv \ 
    238269        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ 
     270        | hexagon \ 
    239271        | i370 | i860 | i960 | ia64 \ 
    240272        | ip2k | iq2000 \ 
    241         | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ 
     273        | le32 | le64 \ 
     274        | lm32 \ 
     275        | m32c | m32r | m32rle | m68000 | m68k | m88k \ 
     276        | maxq | mb | microblaze | mcore | mep | metag \ 
    242277        | mips | mipsbe | mipseb | mipsel | mipsle \ 
    243278        | mips16 \ 
    244279        | mips64 | mips64el \ 
     280        | mips64octeon | mips64octeonel \ 
     281        | mips64orion | mips64orionel \ 
     282        | mips64r5900 | mips64r5900el \ 
    245283        | mips64vr | mips64vrel \ 
    246         | mips64orion | mips64orionel \ 
    247284        | mips64vr4100 | mips64vr4100el \ 
    248285        | mips64vr4300 | mips64vr4300el \ 
    249286        | mips64vr5000 | mips64vr5000el \ 
     287        | mips64vr5900 | mips64vr5900el \ 
    250288        | mipsisa32 | mipsisa32el \ 
    251289        | mipsisa32r2 | mipsisa32r2el \ 
     
    256294        | mipstx39 | mipstx39el \ 
    257295        | mn10200 | mn10300 \ 
     296        | moxie \ 
     297        | mt \ 
    258298        | msp430 \ 
     299        | nds32 | nds32le | nds32be \ 
     300        | nios | nios2 \ 
    259301        | ns16k | ns32k \ 
    260         | openrisc | or32 \ 
     302        | open8 \ 
     303        | or32 \ 
    261304        | pdp10 | pdp11 | pj | pjl \ 
    262         | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ 
     305        | powerpc | powerpc64 | powerpc64le | powerpcle \ 
    263306        | pyramid \ 
    264         | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ 
     307        | rl78 | rx \ 
     308        | score \ 
     309        | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ 
    265310        | sh64 | sh64le \ 
    266         | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ 
    267         | sparcv8 | sparcv9 | sparcv9b \ 
    268         | strongarm \ 
    269         | tahoe | thumb | tic4x | tic80 | tron \ 
    270         | v850 | v850e \ 
     311        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ 
     312        | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ 
     313        | spu \ 
     314        | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ 
     315        | ubicom32 \ 
     316        | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ 
    271317        | we32k \ 
    272         | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ 
    273         | z8k) 
     318        | x86 | xc16x | xstormy16 | xtensa \ 
     319        | z8k | z80) 
    274320                basic_machine=$basic_machine-unknown 
    275321                ;; 
    276         m6811 | m68hc11 | m6812 | m68hc12) 
    277                 # Motorola 68HC11/12. 
     322        c54x) 
     323                basic_machine=tic54x-unknown 
     324                ;; 
     325        c55x) 
     326                basic_machine=tic55x-unknown 
     327                ;; 
     328        c6x) 
     329                basic_machine=tic6x-unknown 
     330                ;; 
     331        m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) 
    278332                basic_machine=$basic_machine-unknown 
    279333                os=-none 
    280334                ;; 
    281335        m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) 
     336                ;; 
     337        ms1) 
     338                basic_machine=mt-unknown 
     339                ;; 
     340 
     341        strongarm | thumb | xscale) 
     342                basic_machine=arm-unknown 
     343                ;; 
     344        xgate) 
     345                basic_machine=$basic_machine-unknown 
     346                os=-none 
     347                ;; 
     348        xscaleeb) 
     349                basic_machine=armeb-unknown 
     350                ;; 
     351 
     352        xscaleel) 
     353                basic_machine=armel-unknown 
    282354                ;; 
    283355 
     
    296368        580-* \ 
    297369        | a29k-* \ 
     370        | aarch64-* | aarch64_be-* \ 
    298371        | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ 
    299372        | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ 
    300373        | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ 
    301374        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \ 
    302         | avr-* \ 
     375        | avr-* | avr32-* \ 
     376        | be32-* | be64-* \ 
    303377        | bfin-* | bs2000-* \ 
    304         | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ 
     378        | c[123]* | c30-* | [cjt]90-* | c4x-* \ 
    305379        | clipper-* | craynv-* | cydra-* \ 
    306380        | d10v-* | d30v-* | dlx-* \ 
    307381        | elxsi-* \ 
    308         | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ 
     382        | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ 
    309383        | h8300-* | h8500-* \ 
    310384        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ 
     385        | hexagon-* \ 
    311386        | i*86-* | i860-* | i960-* | ia64-* \ 
    312387        | ip2k-* | iq2000-* \ 
    313         | m32r-* | m32rle-* \ 
     388        | le32-* | le64-* \ 
     389        | lm32-* \ 
     390        | m32c-* | m32r-* | m32rle-* \ 
    314391        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ 
    315         | m88110-* | m88k-* | maxq-* | mcore-* \ 
     392        | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ 
    316393        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ 
    317394        | mips16-* \ 
    318395        | mips64-* | mips64el-* \ 
     396        | mips64octeon-* | mips64octeonel-* \ 
     397        | mips64orion-* | mips64orionel-* \ 
     398        | mips64r5900-* | mips64r5900el-* \ 
    319399        | mips64vr-* | mips64vrel-* \ 
    320         | mips64orion-* | mips64orionel-* \ 
    321400        | mips64vr4100-* | mips64vr4100el-* \ 
    322401        | mips64vr4300-* | mips64vr4300el-* \ 
    323402        | mips64vr5000-* | mips64vr5000el-* \ 
     403        | mips64vr5900-* | mips64vr5900el-* \ 
    324404        | mipsisa32-* | mipsisa32el-* \ 
    325405        | mipsisa32r2-* | mipsisa32r2el-* \ 
     
    330410        | mipstx39-* | mipstx39el-* \ 
    331411        | mmix-* \ 
     412        | mt-* \ 
    332413        | msp430-* \ 
     414        | nds32-* | nds32le-* | nds32be-* \ 
     415        | nios-* | nios2-* \ 
    333416        | none-* | np1-* | ns16k-* | ns32k-* \ 
     417        | open8-* \ 
    334418        | orion-* \ 
    335419        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ 
    336         | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ 
     420        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ 
    337421        | pyramid-* \ 
    338         | romp-* | rs6000-* \ 
    339         | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ 
     422        | rl78-* | romp-* | rs6000-* | rx-* \ 
     423        | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ 
    340424        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ 
    341         | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ 
     425        | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ 
    342426        | sparclite-* \ 
    343         | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ 
    344         | tahoe-* | thumb-* \ 
     427        | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ 
     428        | tahoe-* \ 
    345429        | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ 
     430        | tile*-* \ 
    346431        | tron-* \ 
    347         | v850-* | v850e-* | vax-* \ 
     432        | ubicom32-* \ 
     433        | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ 
     434        | vax-* \ 
    348435        | we32k-* \ 
    349         | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ 
    350         | xstormy16-* | xtensa-* \ 
     436        | x86-* | x86_64-* | xc16x-* | xps100-* \ 
     437        | xstormy16-* | xtensa*-* \ 
    351438        | ymp-* \ 
    352         | z8k-*) 
     439        | z8k-* | z80-*) 
     440                ;; 
     441        # Recognize the basic CPU types without company name, with glob match. 
     442        xtensa*) 
     443                basic_machine=$basic_machine-unknown 
    353444                ;; 
    354445        # Recognize the various machine names and aliases which stand 
     
    368459                os=-udi 
    369460                ;; 
    370         abacus) 
     461        abacus) 
    371462                basic_machine=abacus-unknown 
    372463                ;; 
     
    414505                os=-bsd 
    415506                ;; 
     507        aros) 
     508                basic_machine=i386-pc 
     509                os=-aros 
     510                ;; 
    416511        aux) 
    417512                basic_machine=m68k-apple 
     
    422517                os=-dynix 
    423518                ;; 
     519        blackfin) 
     520                basic_machine=bfin-unknown 
     521                os=-linux 
     522                ;; 
     523        blackfin-*) 
     524                basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` 
     525                os=-linux 
     526                ;; 
     527        bluegene*) 
     528                basic_machine=powerpc-ibm 
     529                os=-cnk 
     530                ;; 
     531        c54x-*) 
     532                basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` 
     533                ;; 
     534        c55x-*) 
     535                basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` 
     536                ;; 
     537        c6x-*) 
     538                basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` 
     539                ;; 
    424540        c90) 
    425541                basic_machine=c90-cray 
    426542                os=-unicos 
    427543                ;; 
     544        cegcc) 
     545                basic_machine=arm-unknown 
     546                os=-cegcc 
     547                ;; 
    428548        convex-c1) 
    429549                basic_machine=c1-convex 
     
    454574                os=-unicosmp 
    455575                ;; 
    456         cr16c) 
    457                 basic_machine=cr16c-unknown 
     576        cr16 | cr16-*) 
     577                basic_machine=cr16-unknown 
    458578                os=-elf 
    459579                ;; 
     
    493613                os=-sysv3 
    494614                ;; 
     615        dicos) 
     616                basic_machine=i686-pc 
     617                os=-dicos 
     618                ;; 
    495619        djgpp) 
    496620                basic_machine=i586-pc 
     
    608732                basic_machine=i370-ibm 
    609733                ;; 
    610 # I'm not sure what "Sysv32" means.  Should this be sysv3.2? 
    611734        i*86v32) 
    612735                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` 
     
    647770                os=-sysv 
    648771                ;; 
     772        m68knommu) 
     773                basic_machine=m68k-unknown 
     774                os=-linux 
     775                ;; 
     776        m68knommu-*) 
     777                basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` 
     778                os=-linux 
     779                ;; 
    649780        m88k-omron*) 
    650781                basic_machine=m88k-omron 
     
    658789                os=-sysv 
    659790                ;; 
     791        microblaze) 
     792                basic_machine=microblaze-xilinx 
     793                ;; 
    660794        mingw32) 
    661795                basic_machine=i386-pc 
    662796                os=-mingw32 
    663797                ;; 
     798        mingw32ce) 
     799                basic_machine=arm-unknown 
     800                os=-mingw32ce 
     801                ;; 
    664802        miniframe) 
    665803                basic_machine=m68000-convergent 
     
    687825                os=-msdos 
    688826                ;; 
     827        ms1-*) 
     828                basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` 
     829                ;; 
     830        msys) 
     831                basic_machine=i386-pc 
     832                os=-msys 
     833                ;; 
    689834        mvs) 
    690835                basic_machine=i370-ibm 
    691836                os=-mvs 
     837                ;; 
     838        nacl) 
     839                basic_machine=le32-unknown 
     840                os=-nacl 
    692841                ;; 
    693842        ncr3000) 
     
    755904                basic_machine=np1-gould 
    756905                ;; 
     906        neo-tandem) 
     907                basic_machine=neo-tandem 
     908                ;; 
     909        nse-tandem) 
     910                basic_machine=nse-tandem 
     911                ;; 
    757912        nsr-tandem) 
    758913                basic_machine=nsr-tandem 
     
    762917                os=-proelf 
    763918                ;; 
    764         or32 | or32-*) 
     919        openrisc | openrisc-*) 
    765920                basic_machine=or32-unknown 
    766                 os=-coff 
    767921                ;; 
    768922        os400) 
     
    786940                os=-osf 
    787941                ;; 
     942        parisc) 
     943                basic_machine=hppa-unknown 
     944                os=-linux 
     945                ;; 
     946        parisc-*) 
     947                basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` 
     948                os=-linux 
     949                ;; 
    788950        pbd) 
    789951                basic_machine=sparc-tti 
     
    795957                basic_machine=ns32k-pc532 
    796958                ;; 
     959        pc98) 
     960                basic_machine=i386-pc 
     961                ;; 
     962        pc98-*) 
     963                basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` 
     964                ;; 
    797965        pentium | p5 | k5 | k6 | nexgen | viac3) 
    798966                basic_machine=i586-pc 
     
    824992        power)  basic_machine=power-ibm 
    825993                ;; 
    826         ppc)    basic_machine=powerpc-unknown 
    827                 ;; 
    828         ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` 
     994        ppc | ppcbe)    basic_machine=powerpc-unknown 
     995                ;; 
     996        ppc-* | ppcbe-*) 
     997                basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` 
    829998                ;; 
    830999        ppcle | powerpclittle | ppc-le | powerpc-little) 
     
    8511020                os=-pw32 
    8521021                ;; 
     1022        rdos) 
     1023                basic_machine=i386-pc 
     1024                os=-rdos 
     1025                ;; 
    8531026        rom68k) 
    8541027                basic_machine=m68k-rom68k 
     
    8771050                basic_machine=mipsisa64sb1el-unknown 
    8781051                ;; 
     1052        sde) 
     1053                basic_machine=mipsisa32-sde 
     1054                os=-elf 
     1055                ;; 
    8791056        sei) 
    8801057                basic_machine=mips-sei 
     
    8881065                os=-hms 
    8891066                ;; 
     1067        sh5el) 
     1068                basic_machine=sh5le-unknown 
     1069                ;; 
    8901070        sh64) 
    8911071                basic_machine=sh64-unknown 
     
    9091089                os=-sysv4 
    9101090                ;; 
     1091        strongarm-* | thumb-*) 
     1092                basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` 
     1093                ;; 
    9111094        sun2) 
    9121095                basic_machine=m68000-sun 
     
    9651148                os=-unicos 
    9661149                ;; 
    967         tic54x | c54x*) 
    968                 basic_machine=tic54x-unknown 
    969                 os=-coff 
    970                 ;; 
    971         tic55x | c55x*) 
    972                 basic_machine=tic55x-unknown 
    973                 os=-coff 
    974                 ;; 
    975         tic6x | c6x*) 
    976                 basic_machine=tic6x-unknown 
    977                 os=-coff 
     1150        tile*) 
     1151                basic_machine=$basic_machine-unknown 
     1152                os=-linux-gnu 
    9781153                ;; 
    9791154        tx39) 
     
    10441219                basic_machine=xps100-honeywell 
    10451220                ;; 
     1221        xscale-* | xscalee[bl]-*) 
     1222                basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` 
     1223                ;; 
    10461224        ymp) 
    10471225                basic_machine=ymp-cray 
     
    10501228        z8k-*-coff) 
    10511229                basic_machine=z8k-unknown 
     1230                os=-sim 
     1231                ;; 
     1232        z80-*-coff) 
     1233                basic_machine=z80-unknown 
    10521234                os=-sim 
    10531235                ;; 
     
    10901272                basic_machine=we32k-att 
    10911273                ;; 
    1092         sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) 
     1274        sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) 
    10931275                basic_machine=sh-unknown 
    10941276                ;; 
    1095         sh64) 
    1096                 basic_machine=sh64-unknown 
    1097                 ;; 
    1098         sparc | sparcv8 | sparcv9 | sparcv9b) 
     1277        sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) 
    10991278                basic_machine=sparc-sun 
    11001279                ;; 
     
    11131292        pmac | pmac-mpw) 
    11141293                basic_machine=powerpc-apple 
    1115                 ;; 
    1116         nios2*) 
    1117                 basic_machine=nios2-altera 
    11181294                ;; 
    11191295        *-unknown) 
     
    11431319then 
    11441320case $os in 
    1145         # First match some system type aliases 
    1146         # that might get confused with valid system types. 
     1321        # First match some system type aliases 
     1322        # that might get confused with valid system types. 
    11471323        # -solaris* is a basic system type, with this one exception. 
     1324        -auroraux) 
     1325                os=-auroraux 
     1326                ;; 
    11481327        -solaris1 | -solaris1.*) 
    11491328                os=`echo $os | sed -e 's|solaris1|sunos4|'` 
     
    11661345        # -sysv* is not here because it comes later, after sysvr4. 
    11671346        -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ 
    1168               | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ 
    1169               | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ 
     1347              | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ 
     1348              | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ 
     1349              | -sym* | -kopensolaris* \ 
    11701350              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ 
    1171               | -aos* \ 
     1351              | -aos* | -aros* \ 
    11721352              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ 
    11731353              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ 
    1174               | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ 
     1354              | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ 
     1355              | -bitrig* | -openbsd* | -solidbsd* \ 
    11751356              | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ 
    11761357              | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ 
    11771358              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ 
    11781359              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 
    1179               | -chorusos* | -chorusrdb* \ 
    1180               | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 
    1181               | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ 
     1360              | -chorusos* | -chorusrdb* | -cegcc* \ 
     1361              | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 
     1362              | -mingw32* | -linux-gnu* | -linux-android* \ 
     1363              | -linux-newlib* | -linux-uclibc* \ 
     1364              | -uxpv* | -beos* | -mpeix* | -udk* \ 
    11821365              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ 
    11831366              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 
     
    11851368              | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ 
    11861369              | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ 
    1187               | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) 
     1370              | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ 
     1371              | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) 
    11881372        # Remember, each alternative MUST END IN *, to match a version number. 
    11891373                ;; 
     
    12031387                ;; 
    12041388        -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ 
    1205               | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ 
     1389              | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ 
    12061390              | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) 
    12071391                ;; 
     
    12241408                os=-openedition 
    12251409                ;; 
    1226         -os400*) 
     1410        -os400*) 
    12271411                os=-os400 
    12281412                ;; 
     
    12731457                os=-sysv4 
    12741458                ;; 
    1275         -tpf*) 
     1459        -tpf*) 
    12761460                os=-tpf 
    12771461                ;; 
     
    13141498        -zvmoe) 
    13151499                os=-zvmoe 
     1500                ;; 
     1501        -dicos*) 
     1502                os=-dicos 
     1503                ;; 
     1504        -nacl*) 
    13161505                ;; 
    13171506        -none) 
     
    13371526 
    13381527case $basic_machine in 
     1528        score-*) 
     1529                os=-elf 
     1530                ;; 
     1531        spu-*) 
     1532                os=-elf 
     1533                ;; 
    13391534        *-acorn) 
    13401535                os=-riscix1.2 
     
    13461541                os=-aout 
    13471542                ;; 
    1348     c4x-* | tic4x-*) 
    1349         os=-coff 
    1350         ;; 
     1543        c4x-* | tic4x-*) 
     1544                os=-coff 
     1545                ;; 
     1546        hexagon-*) 
     1547                os=-elf 
     1548                ;; 
     1549        tic54x-*) 
     1550                os=-coff 
     1551                ;; 
     1552        tic55x-*) 
     1553                os=-coff 
     1554                ;; 
     1555        tic6x-*) 
     1556                os=-coff 
     1557                ;; 
    13511558        # This must come before the *-dec entry. 
    13521559        pdp10-*) 
     
    13671574        m68000-sun) 
    13681575                os=-sunos3 
    1369                 # This also exists in the configure program, but was not the 
    1370                 # default. 
    1371                 # os=-sunos4 
    13721576                ;; 
    13731577        m68*-cisco) 
    13741578                os=-aout 
    13751579                ;; 
     1580        mep-*) 
     1581                os=-elf 
     1582                ;; 
    13761583        mips*-cisco) 
    13771584                os=-elf 
     
    13921599                os=-beos 
    13931600                ;; 
     1601        *-haiku) 
     1602                os=-haiku 
     1603                ;; 
    13941604        *-ibm) 
    13951605                os=-aix 
    13961606                ;; 
    1397         *-knuth) 
     1607        *-knuth) 
    13981608                os=-mmixware 
    13991609                ;; 
     
    15001710                                vendor=sun 
    15011711                                ;; 
    1502                         -aix*) 
     1712                        -cnk*|-aix*) 
    15031713                                vendor=ibm 
    15041714                                ;; 
     
    15631773 
    15641774echo $basic_machine$os 
    1565 exit 0 
     1775exit 
    15661776 
    15671777# Local variables: 
  • pjproject/branches/projects/android/pjlib/include/pj/compat/socket.h

    r3553 r4192  
    176176#undef s_addr 
    177177#undef s6_addr 
     178#undef sin_zero 
    178179 
    179180/* 
Note: See TracChangeset for help on using the changeset viewer.