Changeset 92 for trunk

Show
Ignore:
Timestamp:
11/11/06 19:40:44 (2 years ago)
Author:
dragorn
Message:

CACE Airpcap configure checks (maybe)

Location:
trunk
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • trunk/config.guess

    <
    r20 r92  
    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-06-05' 
     3#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 
     4#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, 
     5#   Inc. 
     6 
     7timestamp='2006-07-02' 
    78 
    89# This file is free software; you can redistribute it and/or modify it 
     
    1819# You should have received a copy of the GNU General Public License 
    1920# along with this program; if not, write to the Free Software 
    20 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 
     21# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 
     22# 02110-1301, USA. 
    2123# 
    2224# As a special exception to the GNU General Public License, if you 
     
    2527# the same distribution terms that you use for the rest of that program. 
    2628 
    27 # Written by Per Bothner <bothner@cygnus.com>. 
    28 # Please send patches to <config-patches@gnu.org>. 
     29 
     30# Originally written by Per Bothner <per@bothner.com>. 
     31# Please send patches to <config-patches@gnu.org>.  Submit a context 
     32# diff and a properly formatted ChangeLog entry. 
    2933# 
    3034# This script attempts to guess a canonical system name similar to 
     
    5357 
    5458Originally written by Per Bothner. 
    55 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 
     59Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 
    5660Free Software Foundation, Inc. 
    5761 
     
    6670  case $1 in 
    6771    --time-stamp | --time* | -t ) 
    68        echo "$timestamp" ; exit 0 ;; 
     72       echo "$timestamp" ; exit ;; 
    6973    --version | -v ) 
    70        echo "$version" ; exit 0 ;; 
     74       echo "$version" ; exit ;; 
    7175    --help | --h* | -h ) 
    72        echo "$usage"; exit 0 ;; 
     76       echo "$usage"; exit ;; 
    7377    -- )     # Stop option processing 
    7478       shift; break ;; 
     
    8892fi 
    8993 
    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. 
     94trap 'exit 1' 1 2 15 
     95 
     96# CC_FOR_BUILD -- compiler used by this script. Note that the use of a 
     97# compiler to aid in system detection is discouraged as it requires 
     98# temporary files to be created and, as you can see below, it is a 
     99# headache to deal with in a portable fashion. 
     100 
    95101# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still 
    96102# use `HOST_CC' if defined, but it is deprecated. 
    97103 
     104# Portable tmp directory creation inspired by the Autoconf team. 
     105 
     106set_cc_for_build=' 
     107trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; 
     108trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; 
     109: ${TMPDIR=/tmp} ; 
     110 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || 
     111 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || 
     112 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || 
     113 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; 
     114dummy=$tmp/dummy ; 
     115tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; 
    98116case $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              CC_FOR_BUILD="$c"; break 
    104           fi 
    105         done 
    106         rm -f $dummy.c $dummy.o $dummy.rel 
     117 ,,)    echo "int x;" > $dummy.c ; 
     118        for c in cc gcc c89 c99 ; do 
     119          if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then 
     120             CC_FOR_BUILD="$c"; break ; 
     121          fi ; 
     122        done ; 
    107123        if test x"$CC_FOR_BUILD" = x ; then 
    108           CC_FOR_BUILD=no_compiler_found 
     124          CC_FOR_BUILD=no_compiler_found ; 
    109125        fi 
    110126        ;; 
    111127 ,,*)   CC_FOR_BUILD=$CC ;; 
    112128 ,*,*)  CC_FOR_BUILD=$HOST_CC ;; 
    113 esac 
     129esac ; set_cc_for_build= ;' 
    114130 
    115131# This is needed to find uname on a Pyramid OSx when run in the BSD universe. 
    116 # (ghazi@noc.rutgers.edu 8/24/94.) 
     132# (ghazi@noc.rutgers.edu 1994-08-24) 
    117133if (test -f /.attbin/uname) >/dev/null 2>&1 ; then 
    118134        PATH=$PATH:/.attbin ; export PATH 
     
    124140UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown 
    125141 
     142if [ "${UNAME_SYSTEM}" = "Linux" ] ; then 
     143        eval $set_cc_for_build 
     144        cat << EOF > $dummy.c 
     145        #include <features.h> 
     146        #ifdef __UCLIBC__ 
     147        # ifdef __UCLIBC_CONFIG_VERSION__ 
     148        LIBC=uclibc __UCLIBC_CONFIG_VERSION__ 
     149        # else 
     150        LIBC=uclibc 
     151        # endif 
     152        #else 
     153        LIBC=gnu 
     154        #endif 
     155EOF 
     156        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'` 
     157fi 
     158 
    126159# Note: order is significant - the case branches are not exclusive. 
    127160 
    128161case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in 
    129162    *:NetBSD:*:*) 
    130         # Netbsd (nbsd) targets should (where applicable) match one or 
     163        # NetBSD (nbsd) targets should (where applicable) match one or 
    131164        # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, 
    132165        # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently 
     
    135168        # compatibility and a consistent mechanism for selecting the 
    136169        # 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 ;; 
     170        # 
     171        # Note: NetBSD doesn't particularly care about the vendor 
     172        # portion of the name.  We always set it to "unknown". 
     173        sysctl="sysctl -n hw.machine_arch" 
     174        UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ 
     175            /usr/sbin/$sysctl 2>/dev/null || echo unknown)` 
     176        case "${UNAME_MACHINE_ARCH}" in 
     177            armeb) machine=armeb-unknown ;; 
     178            arm*) machine=arm-unknown ;; 
     179            sh3el) machine=shl-unknown ;; 
     180            sh3eb) machine=sh-unknown ;; 
     181            *) machine=${UNAME_MACHINE_ARCH}-unknown ;; 
    148182        esac 
    149183        # The Operating System including object format, if it has switched 
    150184        # 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) 
     185        case "${UNAME_MACHINE_ARCH}" in 
     186            arm*|i386|m68k|ns32k|sh3*|sparc|vax) 
     187                eval $set_cc_for_build 
    153188                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ 
    154189                        | grep __ELF__ >/dev/null 
     
    166201        esac 
    167202        # The OS release 
    168         release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 
     203        # Debian GNU/NetBSD machines have a different userland, and 
     204        # thus, need a distinct triplet. However, they do not need 
     205        # kernel version information, so it can be replaced with a 
     206        # suitable tag, in the style of linux-gnu. 
     207        case "${UNAME_VERSION}" in 
     208            Debian*) 
     209                release='-gnu' 
     210                ;; 
     211            *) 
     212                release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` 
     213                ;; 
     214        esac 
    169215        # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: 
    170216        # contains redundant information, the shorter form: 
    171217        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. 
    172218        echo "${machine}-${os}${release}" 
    173         exit 0 ;; 
     219        exit ;; 
     220    *:OpenBSD:*:*) 
     221        UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` 
     222        echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} 
     223        exit ;; 
     224    *:ekkoBSD:*:*) 
     225        echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} 
     226        exit ;; 
     227    *:SolidBSD:*:*) 
     228        echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} 
     229        exit ;; 
     230    macppc:MirBSD:*:*) 
     231        echo powerpc-unknown-mirbsd${UNAME_RELEASE} 
     232        exit ;; 
     233    *:MirBSD:*:*) 
     234        echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} 
     235        exit ;; 
    174236    alpha:OSF1:*:*) 
    175         if test $UNAME_RELEASE = "V4.0"; then 
     237        case $UNAME_RELEASE in 
     238        *4.0) 
    176239                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` 
    177         fi 
     240                ;; 
     241        *5.*) 
     242                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` 
     243                ;; 
     244        esac 
     245        # According to Compaq, /usr/sbin/psrinfo has been available on 
     246        # OSF/1 and Tru64 systems produced since 1995.  I hope that 
     247        # covers most systems running today.  This code pipes the CPU 
     248        # types through head -n 1, so we only detect the type of CPU 0. 
     249        ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1` 
     250        case "$ALPHA_CPU_TYPE" in 
     251            "EV4 (21064)") 
     252                UNAME_MACHINE="alpha" ;; 
     253            "EV4.5 (21064)") 
     254                UNAME_MACHINE="alpha" ;; 
     255            "LCA4 (21066/21068)") 
     256                UNAME_MACHINE="alpha" ;; 
     257            "EV5 (21164)") 
     258                UNAME_MACHINE="alphaev5" ;; 
     259            "EV5.6 (21164A)") 
     260                UNAME_MACHINE="alphaev56" ;; 
     261            "EV5.6 (21164PC)") 
     262                UNAME_MACHINE="alphapca56" ;; 
     263            "EV5.7 (21164PC)") 
     264                UNAME_MACHINE="alphapca57" ;; 
     265            "EV6 (21264)") 
     266                UNAME_MACHINE="alphaev6" ;; 
     267            "EV6.7 (21264A)") 
     268                UNAME_MACHINE="alphaev67" ;; 
     269            "EV6.8CB (21264C)") 
     270                UNAME_MACHINE="alphaev68" ;; 
     271            "EV6.8AL (21264B)") 
     272                UNAME_MACHINE="alphaev68" ;; 
     273            "EV6.8CX (21264D)") 
     274                UNAME_MACHINE="alphaev68" ;; 
     275            "EV6.9A (21264/EV69A)") 
     276                UNAME_MACHINE="alphaev69" ;; 
     277            "EV7 (21364)") 
     278                UNAME_MACHINE="alphaev7" ;; 
     279            "EV7.9 (21364A)") 
     280                UNAME_MACHINE="alphaev79" ;; 
     281        esac 
     282        # A Pn.n version is a patched version. 
    178283        # A Vn.n version is a released version. 
    179284        # A Tn.n version is a released field test version. 
    180285        # A Xn.n version is an unreleased experimental baselevel. 
    181286        # 1.2 uses "1.2" for uname -r. 
    182         cat <<EOF >$dummy.s 
    183         .data 
    184 \$Lformat: 
    185         .byte 37,100,45,37,120,10,0     # "%d-%x\n" 
    186  
    187         .text 
    188         .globl main 
    189         .align 4 
    190         .ent main 
    191 main: 
    192         .frame \$30,16,\$26,0 
    193         ldgp \$29,0(\$27) 
    194         .prologue 1 
    195         .long 0x47e03d80 # implver \$0 
    196         lda \$2,-1 
    197         .long 0x47e20c21 # amask \$2,\$1 
    198         lda \$16,\$Lformat 
    199         mov \$0,\$17 
    200         not \$1,\$18 
    201         jsr \$26,printf 
    202         ldgp \$29,0(\$26) 
    203         mov 0,\$16 
    204         jsr \$26,exit 
    205         .end main 
    206 EOF 
    207         $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null 
    208         if test "$?" = 0 ; then 
    209                 case `./$dummy` in 
    210                         0-0) 
    211                                 UNAME_MACHINE="alpha" 
    212                                 ;; 
    213                         1-0) 
    214                                 UNAME_MACHINE="alphaev5" 
    215                                 ;; 
    216                         1-1) 
    217                                 UNAME_MACHINE="alphaev56" 
    218                                 ;; 
    219                         1-101) 
    220                                 UNAME_MACHINE="alphapca56" 
    221                                 ;; 
    222                         2-303) 
    223                                 UNAME_MACHINE="alphaev6" 
    224                                 ;; 
    225                         2-307) 
    226                                 UNAME_MACHINE="alphaev67" 
    227                                 ;; 
    228                 esac 
    229         fi 
    230         rm -f $dummy.s $dummy 
    231         echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 
    232         exit 0 ;; 
     287        echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 
     288        exit ;; 
    233289    Alpha\ *:Windows_NT*:*) 
    234290        # How do we know it's Interix rather than the generic POSIX subsystem? 
     
    236292        # of the specific Alpha model? 
    237293        echo alpha-pc-interix 
    238         exit 0 ;; 
     294        exit ;; 
    239295    21064:Windows_NT:50:3) 
    240296        echo alpha-dec-winnt3.5 
    241         exit 0 ;; 
     297        exit ;; 
    242298    Amiga*:UNIX_System_V:4.0:*) 
    243299        echo m68k-unknown-sysv4 
    244         exit 0;; 
    245     amiga:OpenBSD:*:*) 
    246         echo m68k-unknown-openbsd${UNAME_RELEASE} 
    247         exit 0 ;; 
     300        exit ;; 
    248301    *:[Aa]miga[Oo][Ss]:*:*) 
    249302        echo ${UNAME_MACHINE}-unknown-amigaos 
    250         exit 0 ;; 
    251     arc64:OpenBSD:*:*) 
    252         echo mips64el-unknown-openbsd${UNAME_RELEASE} 
    253         exit 0 ;; 
    254     arc:OpenBSD:*:*) 
    255         echo mipsel-unknown-openbsd${UNAME_RELEASE} 
    256         exit 0 ;; 
    257     hkmips:OpenBSD:*:*) 
    258         echo mips-unknown-openbsd${UNAME_RELEASE} 
    259         exit 0 ;; 
    260     pmax:OpenBSD:*:*) 
    261         echo mipsel-unknown-openbsd${UNAME_RELEASE} 
    262         exit 0 ;; 
    263     sgi:OpenBSD:*:*) 
    264         echo mips-unknown-openbsd${UNAME_RELEASE} 
    265         exit 0 ;; 
    266     wgrisc:OpenBSD:*:*) 
    267         echo mipsel-unknown-openbsd${UNAME_RELEASE} 
    268         exit 0 ;; 
     303        exit ;; 
     304    *:[Mm]orph[Oo][Ss]:*:*) 
     305        echo ${UNAME_MACHINE}-unknown-morphos 
     306        exit ;; 
    269307    *:OS/390:*:*) 
    270308        echo i370-ibm-openedition 
    271         exit 0 ;; 
     309        exit ;; 
     310    *:z/VM:*:*) 
     311        echo s390-ibm-zvmoe 
     312        exit ;; 
     313    *:OS400:*:*) 
     314        echo powerpc-ibm-os400 
     315        exit ;; 
    272316    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) 
    273317        echo arm-acorn-riscix${UNAME_RELEASE} 
    274         exit 0;; 
     318        exit ;; 
     319    arm:riscos:*:*|arm:RISCOS:*:*) 
     320        echo arm-unknown-riscos 
     321        exit ;; 
    275322    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) 
    276323        echo hppa1.1-hitachi-hiuxmpp 
    277         exit 0;; 
     324        exit ;; 
    278325    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) 
    279326        # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. 
     
    283330                echo pyramid-pyramid-bsd 
    284331        fi 
    285         exit 0 ;; 
     332        exit ;; 
    286333    NILE*:*:*:dcosx) 
    287334        echo pyramid-pyramid-svr4 
    288         exit 0 ;; 
     335        exit ;; 
     336    DRS?6000:unix:4.0:6*) 
     337        echo sparc-icl-nx6 
     338        exit ;; 
     339    DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) 
     340        case `/usr/bin/uname -p` in 
     341            sparc) echo sparc-icl-nx7; exit ;; 
     342        esac ;; 
    289343    sun4H:SunOS:5.*:*) 
    290344        echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 
    291         exit 0 ;; 
     345        exit ;; 
    292346    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) 
    293347        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 
    294         exit 0 ;; 
     348        exit ;; 
    295349    i86pc:SunOS:5.*:*) 
    296350        echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 
    297         exit 0 ;; 
     351        exit ;; 
    298352    sun4*:SunOS:6*:*) 
    299353        # According to config.sub, this is the proper way to canonicalize 
     
    301355        # it's likely to be more like Solaris than SunOS4. 
    302356        echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` 
    303         exit 0 ;; 
     357        exit ;; 
    304358    sun4*:SunOS:*:*) 
    305359        case "`/usr/bin/arch -k`" in 
     
    310364        # Japanese Language versions have a version number like `4.1.3-JL'. 
    311365        echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` 
    312         exit 0 ;; 
     366        exit ;; 
    313367    sun3*:SunOS:*:*) 
    314368        echo m68k-sun-sunos${UNAME_RELEASE} 
    315         exit 0 ;; 
     369        exit ;; 
    316370    sun*:*:4.2BSD:*) 
    317         UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 
     371        UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` 
    318372        test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 
    319373        case "`/bin/arch`" in 
     
    325379                ;; 
    326380        esac 
    327         exit 0 ;; 
     381        exit ;; 
    328382    aushp:SunOS:*:*) 
    329383        echo sparc-auspex-sunos${UNAME_RELEASE} 
    330         exit 0 ;; 
    331     atari*:OpenBSD:*:*) 
    332         echo m68k-unknown-openbsd${UNAME_RELEASE} 
    333         exit 0 ;; 
     384        exit ;; 
    334385    # The situation for MiNT is a little confusing.  The machine name 
    335386    # can be virtually everything (everything which is not 
     
    342393    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) 
    343394        echo m68k-atari-mint${UNAME_RELEASE} 
    344         exit 0 ;; 
     395        exit ;; 
    345396    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) 
    346397        echo m68k-atari-mint${UNAME_RELEASE} 
    347         exit 0 ;; 
     398        exit ;; 
    348399    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) 
    349400        echo m68k-atari-mint${UNAME_RELEASE} 
    350         exit 0 ;; 
     401        exit ;; 
    351402    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) 
    352403        echo m68k-milan-mint${UNAME_RELEASE} 
    353         exit 0 ;; 
     404        exit ;; 
    354405    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) 
    355406        echo m68k-hades-mint${UNAME_RELEASE} 
    356         exit 0 ;; 
     407        exit ;; 
    357408    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) 
    358409        echo m68k-unknown-mint${UNAME_RELEASE} 
    359         exit 0 ;; 
    360     sun3*:OpenBSD:*:*) 
    361         echo m68k-unknown-openbsd${UNAME_RELEASE} 
    362         exit 0 ;; 
    363     mac68k:OpenBSD:*:*) 
    364         echo m68k-unknown-openbsd${UNAME_RELEASE} 
    365         exit 0 ;; 
    366     mvme68k:OpenBSD:*:*) 
    367         echo m68k-unknown-openbsd${UNAME_RELEASE} 
    368         exit 0 ;; 
    369     mvme88k:OpenBSD:*:*) 
    370         echo m88k-unknown-openbsd${UNAME_RELEASE} 
    371         exit 0 ;; 
     410        exit ;; 
     411    m68k:machten:*:*) 
     412        echo m68k-apple-machten${UNAME_RELEASE} 
     413        exit ;; 
    372414    powerpc:machten:*:*) 
    373415        echo powerpc-apple-machten${UNAME_RELEASE} 
    374         exit 0 ;; 
     416        exit ;; 
    375417    RISC*:Mach:*:*) 
    376418        echo mips-dec-mach_bsd4.3 
    377         exit 0 ;; 
     419        exit ;; 
    378420    RISC*:ULTRIX:*:*) 
    379421        echo mips-dec-ultrix${UNAME_RELEASE} 
    380         exit 0 ;; 
     422        exit ;; 
    381423    VAX*:ULTRIX*:*:*) 
    382424        echo vax-dec-ultrix${UNAME_RELEASE} 
    383         exit 0 ;; 
     425        exit ;; 
    384426    2020:CLIX:*:* | 2430:CLIX:*:*) 
    385427        echo clipper-intergraph-clix${UNAME_RELEASE} 
    386         exit 0 ;; 
     428        exit ;; 
    387429    mips:*:*:UMIPS | mips:*:*:RISCos) 
     430        eval $set_cc_for_build 
    388431        sed 's/^        //' << EOF >$dummy.c 
    389432#ifdef __cplusplus 
     
    407450        } 
    408451EOF 
    409         $CC_FOR_BUILD $dummy.c -o $dummy \ 
    410           && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ 
    411           && rm -f $dummy.c $dummy && exit 0 
    412         rm -f $dummy.c $dummy 
     452        $CC_FOR_BUILD -o $dummy $dummy.c && 
     453          dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && 
     454          SYSTEM_NAME=`$dummy $dummyarg` && 
     455            { echo "$SYSTEM_NAME"; exit; } 
    413456        echo mips-mips-riscos${UNAME_RELEASE} 
    414         exit 0 ;; 
     457        exit ;; 
    415458    Motorola:PowerMAX_OS:*:*) 
    416459        echo powerpc-motorola-powermax 
    417         exit 0 ;; 
     460        exit ;; 
     461    Motorola:*:4.3:PL8-*) 
     462        echo powerpc-harris-powermax 
     463        exit ;; 
     464    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) 
     465        echo powerpc-harris-powermax 
     466        exit ;; 
    418467    Night_Hawk:Power_UNIX:*:*) 
    419468        echo powerpc-harris-powerunix 
    420         exit 0 ;; 
     469        exit ;; 
    421470    m88k:CX/UX:7*:*) 
    422471        echo m88k-harris-cxux7 
    423         exit 0 ;; 
     472        exit ;; 
    424473    m88k:*:4*:R4*) 
    425474        echo m88k-motorola-sysv4 
    426         exit 0 ;; 
     475        exit ;; 
    427476    m88k:*:3*:R3*) 
    428477        echo m88k-motorola-sysv3 
    429         exit 0 ;; 
     478        exit ;; 
    430479    AViiON:dgux:*:*) 
    431480        # DG/UX returns AViiON for all architectures 
     
    443492            echo i586-dg-dgux${UNAME_RELEASE} 
    444493        fi 
    445         exit 0 ;; 
     494        exit ;; 
    446495    M88*:DolphinOS:*:*) # DolphinOS (SVR3) 
    447496        echo m88k-dolphin-sysv3 
    448         exit 0 ;; 
     497        exit ;; 
    449498    M88*:*:R3*:*) 
    450499        # Delta 88k system running SVR3 
    451500        echo m88k-motorola-sysv3 
    452         exit 0 ;; 
     501        exit ;; 
    453502    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) 
    454503        echo m88k-tektronix-sysv3 
    455         exit 0 ;; 
     504        exit ;; 
    456505    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) 
    457506        echo m68k-tektronix-bsd 
    458         exit 0 ;; 
     507        exit ;; 
    459508    *:IRIX*:*:*) 
    460509        echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` 
    461         exit 0 ;; 
     510        exit ;; 
    462511    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. 
    463         echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id 
    464         exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX ' 
     512        echo romp-ibm-aix     # uname -m gives an 8 hex-code CPU id 
     513        exit ;;               # Note that: echo "'`uname -s`'" gives 'AIX ' 
    465514    i*86:AIX:*:*) 
    466515        echo i386-ibm-aix 
    467         exit 0 ;; 
     516        exit ;; 
    468517    ia64:AIX:*:*) 
    469518        if [ -x /usr/bin/oslevel ] ; then 
     
    473522        fi 
    474523        echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} 
    475         exit 0 ;; 
     524        exit ;; 
    476525    *:AIX:2:3) 
    477526        if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then 
     527                eval $set_cc_for_build 
    478528                sed 's/^                //' << EOF >$dummy.c 
    479529                #include <sys/systemcfg.h> 
     
    487537                        } 
    488538EOF 
    489                 $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 
    490                 rm -f $dummy.c $dummy 
    491                 echo rs6000-ibm-aix3.2.5 
     539                if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` 
     540                then 
     541                        echo "$SYSTEM_NAME" 
     542                else 
     543                        echo rs6000-ibm-aix3.2.5 
     544                fi 
    492545        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then 
    493546