source: scripts/untested/blfs-patches/glib-1.2.10-update_config_foo-1.patch @ 617118d

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since 617118d was 617118d, checked in by Jim Gifford <clfs@…>, 18 years ago

r561@server (orig r559): root | 2005-06-05 02:38:49 -0700
Fixed Directory Structure

  • Property mode set to 100644
File size: 51.2 KB
  • config.guess

    diff -uNr glib-1.2.10/config.guess glib-1.2.10-mod/config.guess
    old new  
    11#! /bin/sh
    22# Attempt to guess a canonical system name.
    3 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999
     3#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
    44#   Free Software Foundation, Inc.
    5 #
     5
     6timestamp='2001-09-04'
     7
    68# This file is free software; you can redistribute it and/or modify it
    79# under the terms of the GNU General Public License as published by
    810# the Free Software Foundation; either version 2 of the License, or
     
    2325# the same distribution terms that you use for the rest of that program.
    2426
    2527# Written by Per Bothner <bothner@cygnus.com>.
    26 # The master version of this file is at the FSF in /home/gd/gnu/lib.
    27 # Please send patches to <autoconf-patches@gnu.org>.
     28# Please send patches to <config-patches@gnu.org>.
    2829#
    2930# This script attempts to guess a canonical system name similar to
    3031# config.sub.  If it succeeds, it prints the system name on stdout, and
    3132# exits with 0.  Otherwise, it exits with 1.
    3233#
    3334# The plan is that this can be called by configure scripts if you
    34 # don't specify an explicit system type (host/target name).
    35 #
    36 # Only a few systems have been added to this list; please add others
    37 # (but try to keep the structure clean).
    38 #
     35# don't specify an explicit build system type.
    3936
    40 # Use $HOST_CC if defined. $CC may point to a cross-compiler
    41 if test x"$CC_FOR_BUILD" = x; then
    42   if test x"$HOST_CC" != x; then
    43     CC_FOR_BUILD="$HOST_CC"
    44   else
    45     if test x"$CC" != x; then
    46       CC_FOR_BUILD="$CC"
    47     else
    48       CC_FOR_BUILD=cc
    49     fi
    50   fi
     37me=`echo "$0" | sed -e 's,.*/,,'`
     38
     39usage="\
     40Usage: $0 [OPTION]
     41
     42Output the configuration name of the system \`$me' is run on.
     43
     44Operation modes:
     45  -h, --help         print this help, then exit
     46  -t, --time-stamp   print date of last modification, then exit
     47  -v, --version      print version number, then exit
     48
     49Report bugs and patches to <config-patches@gnu.org>."
     50
     51version="\
     52GNU config.guess ($timestamp)
     53
     54Originally written by Per Bothner.
     55Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
     56Free Software Foundation, Inc.
     57
     58This is free software; see the source for copying conditions.  There is NO
     59warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
     60
     61help="
     62Try \`$me --help' for more information."
     63
     64# Parse command line
     65while test $# -gt 0 ; do
     66  case $1 in
     67    --time-stamp | --time* | -t )
     68       echo "$timestamp" ; exit 0 ;;
     69    --version | -v )
     70       echo "$version" ; exit 0 ;;
     71    --help | --h* | -h )
     72       echo "$usage"; exit 0 ;;
     73    -- )     # Stop option processing
     74       shift; break ;;
     75    - ) # Use stdin as input.
     76       break ;;
     77    -* )
     78       echo "$me: invalid option $1$help" >&2
     79       exit 1 ;;
     80    * )
     81       break ;;
     82  esac
     83done
     84
     85if test $# != 0; then
     86  echo "$me: too many arguments$help" >&2
     87  exit 1
    5188fi
    5289
    5390
     91dummy=dummy-$$
     92trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
     93
     94# CC_FOR_BUILD -- compiler used by this script.
     95# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
     96# use `HOST_CC' if defined, but it is deprecated.
     97
     98set_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             CC_FOR_BUILD="$c"; break ;
     104          fi ;
     105        done ;
     106        rm -f $dummy.c $dummy.o $dummy.rel ;
     107        if test x"$CC_FOR_BUILD" = x ; then
     108          CC_FOR_BUILD=no_compiler_found ;
     109        fi
     110        ;;
     111 ,,*)   CC_FOR_BUILD=$CC ;;
     112 ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
     113esac'
     114
    54115# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
    55 # (ghazi@noc.rutgers.edu 8/24/94.)
     116# (ghazi@noc.rutgers.edu 1994-08-24)
    56117if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
    57118        PATH=$PATH:/.attbin ; export PATH
    58119fi
    59120
    60121UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
    61122UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
    62 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
     123UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
    63124UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
    64125
    65 dummy=dummy-$$
    66 trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
    67 
    68126# Note: order is significant - the case branches are not exclusive.
    69127
    70128case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
     129    *:NetBSD:*:*)
     130        # Netbsd (nbsd) targets should (where applicable) match one or
     131        # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
     132        # *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
     133        # switched to ELF, *-*-netbsd* would select the old
     134        # object file format.  This provides both forward
     135        # compatibility and a consistent mechanism for selecting the
     136        # 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 ;;
     148        esac
     149        # The Operating System including object format, if it has switched
     150        # 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)
     153                eval $set_cc_for_build
     154                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
     155                        | grep __ELF__ >/dev/null
     156                then
     157                    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
     158                    # Return netbsd for either.  FIX?
     159                    os=netbsd
     160                else
     161                    os=netbsdelf
     162                fi
     163                ;;
     164            *)
     165                os=netbsd
     166                ;;
     167        esac
     168        # The OS release
     169        release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
     170        # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
     171        # contains redundant information, the shorter form:
     172        # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
     173        echo "${machine}-${os}${release}"
     174        exit 0 ;;
    71175    alpha:OSF1:*:*)
    72176        if test $UNAME_RELEASE = "V4.0"; then
    73177                UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
     
    77181        # A Xn.n version is an unreleased experimental baselevel.
    78182        # 1.2 uses "1.2" for uname -r.
    79183        cat <<EOF >$dummy.s
     184        .data
     185\$Lformat:
     186        .byte 37,100,45,37,120,10,0     # "%d-%x\n"
     187
     188        .text
    80189        .globl main
     190        .align 4
    81191        .ent main
    82192main:
    83         .frame \$30,0,\$26,0
    84         .prologue 0
    85         .long 0x47e03d80 # implver $0
    86         lda \$2,259
    87         .long 0x47e20c21 # amask $2,$1
    88         srl \$1,8,\$2
    89         sll \$2,2,\$2
    90         sll \$0,3,\$0
    91         addl \$1,\$0,\$0
    92         addl \$2,\$0,\$0
    93         ret \$31,(\$26),1
     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
    94206        .end main
    95207EOF
     208        eval $set_cc_for_build
    96209        $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
    97210        if test "$?" = 0 ; then
    98                 ./$dummy
    99                 case "$?" in
    100                         7)
     211                case `./$dummy` in
     212                        0-0)
    101213                                UNAME_MACHINE="alpha"
    102214                                ;;
    103                         15)
     215                        1-0)
    104216                                UNAME_MACHINE="alphaev5"
    105217                                ;;
    106                         14)
     218                        1-1)
    107219                                UNAME_MACHINE="alphaev56"
    108220                                ;;
    109                         10)
     221                        1-101)
    110222                                UNAME_MACHINE="alphapca56"
    111223                                ;;
    112                         16)
     224                        2-303)
    113225                                UNAME_MACHINE="alphaev6"
    114226                                ;;
     227                        2-307)
     228                                UNAME_MACHINE="alphaev67"
     229                                ;;
     230                        2-1307)
     231                                UNAME_MACHINE="alphaev68"
     232                                ;;
    115233                esac
    116234        fi
    117235        rm -f $dummy.s $dummy
     
    127245        echo alpha-dec-winnt3.5
    128246        exit 0 ;;
    129247    Amiga*:UNIX_System_V:4.0:*)
    130         echo m68k-cbm-sysv4
     248        echo m68k-unknown-sysv4
    131249        exit 0;;
    132     amiga:NetBSD:*:*)
    133       echo m68k-cbm-netbsd${UNAME_RELEASE}
    134       exit 0 ;;
    135250    amiga:OpenBSD:*:*)
    136251        echo m68k-unknown-openbsd${UNAME_RELEASE}
    137252        exit 0 ;;
     
    162277    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
    163278        echo arm-acorn-riscix${UNAME_RELEASE}
    164279        exit 0;;
    165     arm32:NetBSD:*:*)
    166         echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
    167         exit 0 ;;
    168     SR2?01:HI-UX/MPP:*:*)
     280    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
    169281        echo hppa1.1-hitachi-hiuxmpp
    170282        exit 0;;
    171283    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
     
    221333    aushp:SunOS:*:*)
    222334        echo sparc-auspex-sunos${UNAME_RELEASE}
    223335        exit 0 ;;
    224     atari*:NetBSD:*:*)
    225         echo m68k-atari-netbsd${UNAME_RELEASE}
     336    sparc*:NetBSD:*)
     337        echo `uname -p`-unknown-netbsd${UNAME_RELEASE}
    226338        exit 0 ;;
    227339    atari*:OpenBSD:*:*)
    228340        echo m68k-unknown-openbsd${UNAME_RELEASE}
    229341        exit 0 ;;
    230342    # The situation for MiNT is a little confusing.  The machine name
    231343    # can be virtually everything (everything which is not
    232     # "atarist" or "atariste" at least should have a processor 
     344    # "atarist" or "atariste" at least should have a processor
    233345    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
    234346    # to the lowercase version "mint" (or "freemint").  Finally
    235347    # the system name "TOS" denotes a system which is actually not
     
    253365    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
    254366        echo m68k-unknown-mint${UNAME_RELEASE}
    255367        exit 0 ;;
    256     sun3*:NetBSD:*:*)
    257         echo m68k-sun-netbsd${UNAME_RELEASE}
    258         exit 0 ;;
    259368    sun3*:OpenBSD:*:*)
    260369        echo m68k-unknown-openbsd${UNAME_RELEASE}
    261370        exit 0 ;;
    262     mac68k:NetBSD:*:*)
    263         echo m68k-apple-netbsd${UNAME_RELEASE}
    264         exit 0 ;;
    265371    mac68k:OpenBSD:*:*)
    266372        echo m68k-unknown-openbsd${UNAME_RELEASE}
    267373        exit 0 ;;
     
    274380    powerpc:machten:*:*)
    275381        echo powerpc-apple-machten${UNAME_RELEASE}
    276382        exit 0 ;;
    277     macppc:NetBSD:*:*)
    278         echo powerpc-apple-netbsd${UNAME_RELEASE}
    279         exit 0 ;;
    280383    RISC*:Mach:*:*)
    281384        echo mips-dec-mach_bsd4.3
    282385        exit 0 ;;
     
    290393        echo clipper-intergraph-clix${UNAME_RELEASE}
    291394        exit 0 ;;
    292395    mips:*:*:UMIPS | mips:*:*:RISCos)
     396        eval $set_cc_for_build
    293397        sed 's/^        //' << EOF >$dummy.c
    294398#ifdef __cplusplus
     399#include <stdio.h>  /* for printf() prototype */
    295400        int main (int argc, char *argv[]) {
    296401#else
    297402        int main (argc, argv) int argc; char *argv[]; {
     
    312417EOF
    313418        $CC_FOR_BUILD $dummy.c -o $dummy \
    314419          && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
    315           && rm $dummy.c $dummy && exit 0
     420          && rm -f $dummy.c $dummy && exit 0
    316421        rm -f $dummy.c $dummy
    317422        echo mips-mips-riscos${UNAME_RELEASE}
    318423        exit 0 ;;
     424    Motorola:PowerMAX_OS:*:*)
     425        echo powerpc-motorola-powermax
     426        exit 0 ;;
    319427    Night_Hawk:Power_UNIX:*:*)
    320428        echo powerpc-harris-powerunix
    321429        exit 0 ;;
     
    331439    AViiON:dgux:*:*)
    332440        # DG/UX returns AViiON for all architectures
    333441        UNAME_PROCESSOR=`/usr/bin/uname -p`
    334         if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110]
     442        if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
    335443        then
    336444            if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
    337445               [ ${TARGET_BINARY_INTERFACE}x = x ]
     
    363471    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
    364472        echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
    365473        exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
    366     i?86:AIX:*:*)
     474    i*86:AIX:*:*)
    367475        echo i386-ibm-aix
    368476        exit 0 ;;
     477    ia64:AIX:*:*)
     478        if [ -x /usr/bin/oslevel ] ; then
     479                IBM_REV=`/usr/bin/oslevel`
     480        else
     481                IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
     482        fi
     483        echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
     484        exit 0 ;;
    369485    *:AIX:2:3)
    370486        if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
     487                eval $set_cc_for_build
    371488                sed 's/^                //' << EOF >$dummy.c
    372489                #include <sys/systemcfg.h>
    373490
     
    379496                        exit(0);
    380497                        }
    381498EOF
    382                 $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
     499                $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
    383500                rm -f $dummy.c $dummy
    384501                echo rs6000-ibm-aix3.2.5
    385502        elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
     
    388505                echo rs6000-ibm-aix3.2
    389506        fi
    390507        exit 0 ;;
    391     *:AIX:*:4)
     508    *:AIX:*:[45])
    392509        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
    393         if /usr/sbin/lsattr -EHl ${IBM_CPU_ID} | grep POWER >/dev/null 2>&1; then
     510        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
    394511                IBM_ARCH=rs6000
    395512        else
    396513                IBM_ARCH=powerpc
     
    398515        if [ -x /usr/bin/oslevel ] ; then
    399516                IBM_REV=`/usr/bin/oslevel`
    400517        else
    401                 IBM_REV=4.${UNAME_RELEASE}
     518                IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
    402519        fi
    403520        echo ${IBM_ARCH}-ibm-aix${IBM_REV}
    404521        exit 0 ;;
     
    408525    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
    409526        echo romp-ibm-bsd4.4
    410527        exit 0 ;;
    411     ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC NetBSD and
     528    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
    412529        echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
    413530        exit 0 ;;                           # report: romp-ibm BSD 4.3
    414531    *:BOSX:*:*)
     
    424541        echo m68k-hp-bsd4.4
    425542        exit 0 ;;
    426543    9000/[34678]??:HP-UX:*:*)
     544        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
    427545        case "${UNAME_MACHINE}" in
    428546            9000/31? )            HP_ARCH=m68000 ;;
    429547            9000/[34]?? )         HP_ARCH=m68k ;;
    430548            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
    431567              sed 's/^              //' << EOF >$dummy.c
     568
     569              #define _HPUX_SOURCE
    432570              #include <stdlib.h>
    433571              #include <unistd.h>
    434572
     
    459597                  exit (0);
    460598              }
    461599EOF
    462         (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
    463         rm -f $dummy.c $dummy
     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 ;;
    464604        esac
    465         HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
    466605        echo ${HP_ARCH}-hp-hpux${HPUX_REV}
    467606        exit 0 ;;
     607    ia64:HP-UX:*:*)
     608        HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
     609        echo ia64-hp-hpux${HPUX_REV}
     610        exit 0 ;;
    468611    3050*:HI-UX:*:*)
     612        eval $set_cc_for_build
    469613        sed 's/^        //' << EOF >$dummy.c
    470614        #include <unistd.h>
    471615        int
     
    491635          exit (0);
    492636        }
    493637EOF
    494         $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm $dummy.c $dummy && exit 0
     638        $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
    495639        rm -f $dummy.c $dummy
    496640        echo unknown-hitachi-hiuxwe2
    497641        exit 0 ;;
     
    501645    9000/8??:4.3bsd:*:*)
    502646        echo hppa1.0-hp-bsd
    503647        exit 0 ;;
    504     *9??*:MPE/iX:*:*)
     648    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
    505649        echo hppa1.0-hp-mpeix
    506650        exit 0 ;;
    507651    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
     
    510654    hp8??:OSF1:*:*)
    511655        echo hppa1.0-hp-osf
    512656        exit 0 ;;
    513     i?86:OSF1:*:*)
     657    i*86:OSF1:*:*)
    514658        if [ -x /usr/sbin/sysversion ] ; then
    515659            echo ${UNAME_MACHINE}-unknown-osf1mk
    516660        else
     
    545689        echo xmp-cray-unicos
    546690        exit 0 ;;
    547691    CRAY*Y-MP:*:*:*)
    548         echo ymp-cray-unicos${UNAME_RELEASE}
     692        echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    549693        exit 0 ;;
    550694    CRAY*[A-Z]90:*:*:*)
    551695        echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
    552696        | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
    553               -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
     697              -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
     698              -e 's/\.[^.]*$/.X/'
    554699        exit 0 ;;
    555700    CRAY*TS:*:*:*)
    556         echo t90-cray-unicos${UNAME_RELEASE}
     701        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/'
    557705        exit 0 ;;
    558706    CRAY*T3E:*:*:*)
    559         echo alpha-cray-unicosmk${UNAME_RELEASE}
     707        echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
     708        exit 0 ;;
     709    CRAY*SV1:*:*:*)
     710        echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
    560711        exit 0 ;;
    561712    CRAY-2:*:*:*)
    562713        echo cray2-cray-unicos
    563714        exit 0 ;;
    564     F300:UNIX_System_V:*:*)
     715    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
     716        FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
    565717        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
    566718        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
    567         echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
     719        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
    568720        exit 0 ;;
    569     F301:UNIX_System_V:*:*)
    570        echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
    571        exit 0 ;;
    572     hp3[0-9][05]:NetBSD:*:*)
    573         echo m68k-hp-netbsd${UNAME_RELEASE}
    574         exit 0 ;;
    575721    hp300:OpenBSD:*:*)
    576722        echo m68k-unknown-openbsd${UNAME_RELEASE}
    577723        exit 0 ;;
    578     i?86:BSD/386:*:* | i?86:BSD/OS:*:*)
     724    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
    579725        echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
    580726        exit 0 ;;
    581727    sparc*:BSD/OS:*:*)
     
    585731        echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
    586732        exit 0 ;;
    587733    *:FreeBSD:*:*)
    588         if test -x /usr/bin/objformat; then
    589             if test "elf" = "`/usr/bin/objformat`"; then
    590                 echo ${UNAME_MACHINE}-unknown-freebsdelf`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
    591                 exit 0
    592             fi
    593         fi
    594734        echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
    595735        exit 0 ;;
    596     *:NetBSD:*:*)
    597         echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
    598         exit 0 ;;
    599736    *:OpenBSD:*:*)
    600737        echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
    601738        exit 0 ;;
     
    605742    i*:MINGW*:*)
    606743        echo ${UNAME_MACHINE}-pc-mingw32
    607744        exit 0 ;;
     745    i*:PW*:*)
     746        echo ${UNAME_MACHINE}-pc-pw32
     747        exit 0 ;;
    608748    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
    609749        # How do we know it's Interix rather than the generic POSIX subsystem?
    610750        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
     
    623763    *:GNU:*:*)
    624764        echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
    625765        exit 0 ;;
    626     *:Linux:*:*)
    627 
     766    i*86:Minix:*:*)
     767        echo ${UNAME_MACHINE}-pc-minix
     768        exit 0 ;;
     769    arm*:Linux:*:*)
     770        echo ${UNAME_MACHINE}-unknown-linux-gnu
     771        exit 0 ;;
     772    ia64:Linux:*:*)
     773        echo ${UNAME_MACHINE}-unknown-linux
     774        exit 0 ;;
     775    m68*:Linux:*:*)
     776        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 ;;
     790    alpha:Linux:*:*)
     791        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
     792          EV5)   UNAME_MACHINE=alphaev5 ;;
     793          EV56)  UNAME_MACHINE=alphaev56 ;;
     794          PCA56) UNAME_MACHINE=alphapca56 ;;
     795          PCA57) UNAME_MACHINE=alphapca56 ;;
     796          EV6)   UNAME_MACHINE=alphaev6 ;;
     797          EV67)  UNAME_MACHINE=alphaev67 ;;
     798          EV68*) UNAME_MACHINE=alphaev68 ;;
     799        esac
     800        objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
     801        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
     802        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
     803        exit 0 ;;
     804    parisc:Linux:*:* | hppa:Linux:*:*)
     805        # Look for CPU level
     806        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
     807          PA7*) echo hppa1.1-unknown-linux-gnu ;;
     808          PA8*) echo hppa2.0-unknown-linux-gnu ;;
     809          *)    echo hppa-unknown-linux-gnu ;;
     810        esac
     811        exit 0 ;;
     812    parisc64:Linux:*:* | hppa64:Linux:*:*)
     813        echo hppa64-unknown-linux-gnu
     814        exit 0 ;;
     815    s390:Linux:*:* | s390x:Linux:*:*)
     816        echo ${UNAME_MACHINE}-ibm-linux
     817        exit 0 ;;
     818    sh*:Linux:*:*)
     819        echo ${UNAME_MACHINE}-unknown-linux-gnu
     820        exit 0 ;;
     821    sparc:Linux:*:* | sparc64:Linux:*:*)
     822        echo ${UNAME_MACHINE}-unknown-linux-gnu
     823        exit 0 ;;
     824    x86_64:Linux:*:*)
     825        echo x86_64-unknown-linux-gnu
     826        exit 0 ;;
     827    i*86:Linux:*:*)
    628828        # The BFD linker knows what the default object file format is, so
    629829        # first see if it will tell us. cd to the root directory to prevent
    630830        # problems with other programs or directories called `ld' in the path.
    631         ld_help_string=`cd /; ld --help 2>&1`
    632         ld_supported_emulations=`echo $ld_help_string \
    633                          | sed -ne '/supported emulations:/!d
     831        ld_supported_targets=`cd /; ld --help 2>&1 \
     832                         | sed -ne '/supported targets:/!d
    634833                                    s/[         ][      ]*/ /g
    635                                     s/.*supported emulations: *//
     834                                    s/.*supported targets: *//
    636835                                    s/ .*//
    637836                                    p'`
    638         case "$ld_supported_emulations" in
    639           *ia64)
    640                 echo "${UNAME_MACHINE}-unknown-linux"
    641                 exit 0
     837        case "$ld_supported_targets" in
     838          elf32-i386)
     839                TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
    642840                ;;
    643           i?86linux)
     841          a.out-i386-linux)
    644842                echo "${UNAME_MACHINE}-pc-linux-gnuaout"
    645                 exit 0
    646                 ;;
    647           i?86coff)
     843                exit 0 ;;               
     844          coff-i386)
    648845                echo "${UNAME_MACHINE}-pc-linux-gnucoff"
    649                 exit 0
    650                 ;;
    651           sparclinux)
    652                 echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
    653                 exit 0
    654                 ;;
    655           armlinux)
    656                 echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
    657                 exit 0
    658                 ;;
    659           elf32arm*)
    660                 echo "${UNAME_MACHINE}-unknown-linux-gnu"
    661                 exit 0
    662                 ;;
    663           armelf_linux*)
    664                 echo "${UNAME_MACHINE}-unknown-linux-gnu"
    665                 exit 0
    666                 ;;
    667           m68klinux)
    668                 echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
    669                 exit 0
    670                 ;;
    671           elf32ppc)
    672                 # Determine Lib Version
    673                 cat >$dummy.c <<EOF
    674 #include <features.h>
    675 #if defined(__GLIBC__)
    676 extern char __libc_version[];
    677 extern char __libc_release[];
    678 #endif
    679 main(argc, argv)
    680      int argc;
    681      char *argv[];
    682 {
    683 #if defined(__GLIBC__)
    684   printf("%s %s\n", __libc_version, __libc_release);
    685 #else
    686   printf("unkown\n");
    687 #endif
    688   return 0;
    689 }
    690 EOF
    691                 LIBC=""
    692                 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
    693                 if test "$?" = 0 ; then
    694                         ./$dummy | grep 1\.99 > /dev/null
    695                         if test "$?" = 0 ; then
    696                                 LIBC="libc1"
    697                         fi
    698                 fi     
    699                 rm -f $dummy.c $dummy
    700                 echo powerpc-unknown-linux-gnu${LIBC}
    701                 exit 0
    702                 ;;
     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 ;;
    703852        esac
    704 
    705         if test "${UNAME_MACHINE}" = "alpha" ; then
    706                 sed 's/^        //'  <<EOF >$dummy.s
    707                 .globl main
    708                 .ent main
    709         main:
    710                 .frame \$30,0,\$26,0
    711                 .prologue 0
    712                 .long 0x47e03d80 # implver $0
    713                 lda \$2,259
    714                 .long 0x47e20c21 # amask $2,$1
    715                 srl \$1,8,\$2
    716                 sll \$2,2,\$2
    717                 sll \$0,3,\$0
    718                 addl \$1,\$0,\$0
    719                 addl \$2,\$0,\$0
    720                 ret \$31,(\$26),1
    721                 .end main
    722 EOF
    723                 LIBC=""
    724                 $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
    725                 if test "$?" = 0 ; then
    726                         ./$dummy
    727                         case "$?" in
    728                         7)
    729                                 UNAME_MACHINE="alpha"
    730                                 ;;
    731                         15)
    732                                 UNAME_MACHINE="alphaev5"
    733                                 ;;
    734                         14)
    735                                 UNAME_MACHINE="alphaev56"
    736                                 ;;
    737                         10)
    738                                 UNAME_MACHINE="alphapca56"
    739                                 ;;
    740                         16)
    741                                 UNAME_MACHINE="alphaev6"
    742                                 ;;
    743                         esac
    744 
    745                         objdump --private-headers $dummy | \
    746                           grep ld.so.1 > /dev/null
    747                         if test "$?" = 0 ; then
    748                                 LIBC="libc1"
    749                         fi
    750                 fi
    751                 rm -f $dummy.s $dummy
    752                 echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
    753         elif test "${UNAME_MACHINE}" = "mips" ; then
    754           cat >$dummy.c <<EOF
    755 #ifdef __cplusplus
    756         int main (int argc, char *argv[]) {
    757 #else
    758         int main (argc, argv) int argc; char *argv[]; {
    759 #endif
    760 #ifdef __MIPSEB__
    761   printf ("%s-unknown-linux-gnu\n", argv[1]);
    762 #endif
    763 #ifdef __MIPSEL__
    764   printf ("%sel-unknown-linux-gnu\n", argv[1]);
    765 #endif
    766   return 0;
    767 }
    768 EOF
    769           $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
    770           rm -f $dummy.c $dummy
    771         else
    772           # Either a pre-BFD a.out linker (linux-gnuoldld)
    773           # or one that does not give us useful --help.
    774           # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
    775           # If ld does not provide *any* "supported emulations:"
    776           # that means it is gnuoldld.
    777           echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
    778           test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
    779 
    780           case "${UNAME_MACHINE}" in
    781           i?86)
    782             VENDOR=pc;
    783             ;;
    784           *)
    785             VENDOR=unknown;
    786             ;;
    787           esac
    788           # Determine whether the default compiler is a.out or elf
    789           cat >$dummy.c <<EOF
     853        # Determine whether the default compiler is a.out or elf
     854        eval $set_cc_for_build
     855        cat >$dummy.c <<EOF
    790856#include <features.h>
    791857#ifdef __cplusplus
     858#include <stdio.h>  /* for printf() prototype */
    792859        int main (int argc, char *argv[]) {
    793860#else
    794861        int main (argc, argv) int argc; char *argv[]; {
     
    796863#ifdef __ELF__
    797864# ifdef __GLIBC__
    798865#  if __GLIBC__ >= 2
    799     printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
     866    printf ("%s-pc-linux-gnu\n", argv[1]);
    800867#  else
    801     printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
     868    printf ("%s-pc-linux-gnulibc1\n", argv[1]);
    802869#  endif
    803870# else
    804    printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
     871   printf ("%s-pc-linux-gnulibc1\n", argv[1]);
    805872# endif
    806873#else
    807   printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
     874  printf ("%s-pc-linux-gnuaout\n", argv[1]);
    808875#endif
    809876  return 0;
    810877}
    811878EOF
    812           $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm $dummy.c $dummy && exit 0
    813           rm -f $dummy.c $dummy
    814         fi ;;
    815 # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
    816 # are messed up and put the nodename in both sysname and nodename.
    817     i?86:DYNIX/ptx:4*:*)
     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        ;;
     883    i*86:DYNIX/ptx:4*:*)
     884        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
     885        # earlier versions are messed up and put the nodename in both
     886        # sysname and nodename.
    818887        echo i386-sequent-sysv4
    819888        exit 0 ;;
    820     i?86:UNIX_SV:4.2MP:2.*)
     889    i*86:UNIX_SV:4.2MP:2.*)
    821890        # Unixware is an offshoot of SVR4, but it has its own version
    822891        # number series starting with 2...
    823892        # I am not positive that other SVR4 systems won't match this,
     
    825894        # Use sysv4.2uw... so that sysv4* matches it.
    826895        echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
    827896        exit 0 ;;
    828     i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
     897    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
    829898        UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
    830899        if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
    831900                echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
     
    833902                echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
    834903        fi
    835904        exit 0 ;;
    836     i?86:*:5:7*)
    837         # Fixed at (any) Pentium or better
    838         UNAME_MACHINE=i586
    839         if [ ${UNAME_SYSTEM} = "UnixWare" ] ; then
    840             echo ${UNAME_MACHINE}-sco-sysv${UNAME_RELEASE}uw${UNAME_VERSION}
    841         else
    842             echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
    843         fi
     905    i*86:*:5:[78]*)
     906        case `/bin/uname -X | grep "^Machine"` in
     907            *486*)           UNAME_MACHINE=i486 ;;
     908            *Pentium)        UNAME_MACHINE=i586 ;;
     909            *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
     910        esac
     911        echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
    844912        exit 0 ;;
    845     i?86:*:3.2:*)
     913    i*86:*:3.2:*)
    846914        if test -f /usr/options/cb.name; then
    847915                UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
    848916                echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
     
    860928                echo ${UNAME_MACHINE}-pc-sysv32
    861929        fi
    862930        exit 0 ;;
     931    i*86:*DOS:*:*)
     932        echo ${UNAME_MACHINE}-pc-msdosdjgpp
     933        exit 0 ;;
    863934    pc:*:*:*)
     935        # Left here for compatibility:
    864936        # uname -m prints for DJGPP always 'pc', but it prints nothing about
    865937        # the processor, so we play safe by assuming i386.
    866938        echo i386-pc-msdosdjgpp
     
    884956        exit 0 ;;
    885957    M68*:*:R3V[567]*:*)
    886958        test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
    887     3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.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)
    888960        OS_REL=''
    889961        test -r /etc/.relid \
    890962        && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
     
    895967    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
    896968        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
    897969          && echo i486-ncr-sysv4 && exit 0 ;;
    898     m68*:LynxOS:2.*:*)
     970    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
    899971        echo m68k-unknown-lynxos${UNAME_RELEASE}
    900972        exit 0 ;;
    901973    mc68030:UNIX_System_V:4.*:*)
    902974        echo m68k-atari-sysv4
    903975        exit 0 ;;
    904     i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
     976    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
    905977        echo i386-unknown-lynxos${UNAME_RELEASE}
    906978        exit 0 ;;
    907979    TSUNAMI:LynxOS:2.*:*)
    908980        echo sparc-unknown-lynxos${UNAME_RELEASE}
    909981        exit 0 ;;
    910     rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
     982    rs6000:LynxOS:2.*:*)
    911983        echo rs6000-unknown-lynxos${UNAME_RELEASE}
    912984        exit 0 ;;
     985    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
     986        echo powerpc-unknown-lynxos${UNAME_RELEASE}
     987        exit 0 ;;
    913988    SM[BE]S:UNIX_SV:*:*)
    914989        echo mips-dde-sysv${UNAME_RELEASE}
    915990        exit 0 ;;
     
    9271002                echo ns32k-sni-sysv
    9281003        fi
    9291004        exit 0 ;;
    930     PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
    931                            # says <Richard.M.Bartel@ccMail.Census.GOV>
     1005    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
     1006                      # says <Richard.M.Bartel@ccMail.Census.GOV>
    9321007        echo i586-unisys-sysv4
    9331008        exit 0 ;;
    9341009    *:UNIX_System_V:4*:FTX*)
     
    9401015        # From seanf@swdc.stratus.com.
    9411016        echo i860-stratus-sysv4
    9421017        exit 0 ;;
     1018    *:VOS:*:*)
     1019        # From Paul.Green@stratus.com.
     1020        echo hppa1.1-stratus-vos
     1021        exit 0 ;;
    9431022    mc68*:A/UX:*:*)
    9441023        echo m68k-apple-aux${UNAME_RELEASE}
    9451024        exit 0 ;;
    946     news*:NEWS-OS:*:6*)
     1025    news*:NEWS-OS:6*:*)
    9471026        echo mips-sony-newsos6
    9481027        exit 0 ;;
    9491028    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
     
    9741053    *:Rhapsody:*:*)
    9751054        echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
    9761055        exit 0 ;;
     1056    *:Darwin:*:*)
     1057        echo `uname -p`-apple-darwin${UNAME_RELEASE}
     1058        exit 0 ;;
     1059    *:procnto*:*:* | *:QNX:[0123456789]*:*)
     1060        if test "${UNAME_MACHINE}" = "x86pc"; then
     1061                UNAME_MACHINE=pc
     1062        fi
     1063        echo `uname -p`-${UNAME_MACHINE}-nto-qnx
     1064        exit 0 ;;
    9771065    *:QNX:*:4*)
    978         echo i386-qnx-qnx${UNAME_VERSION}
     1066        echo i386-pc-qnx
     1067        exit 0 ;;
     1068    NSR-[KW]:NONSTOP_KERNEL:*:*)
     1069        echo nsr-tandem-nsk${UNAME_RELEASE}
     1070        exit 0 ;;
     1071    *:NonStop-UX:*:*)
     1072        echo mips-compaq-nonstopux
     1073        exit 0 ;;
     1074    BS2000:POSIX*:*:*)
     1075        echo bs2000-siemens-sysv
     1076        exit 0 ;;
     1077    DS/*:UNIX_System_V:*:*)
     1078        echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
     1079        exit 0 ;;
     1080    *:Plan9:*:*)
     1081        # "uname -m" is not consistent, so use $cputype instead. 386
     1082        # is converted to i386 for consistency with other x86
     1083        # operating systems.
     1084        if test "$cputype" = "386"; then
     1085            UNAME_MACHINE=i386
     1086        else
     1087            UNAME_MACHINE="$cputype"
     1088        fi
     1089        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 ;;
     1096    *:TOPS-10:*:*)
     1097        echo pdp10-unknown-tops10
     1098        exit 0 ;;
     1099    *:TENEX:*:*)
     1100        echo pdp10-unknown-tenex
     1101        exit 0 ;;
     1102    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
     1103        echo pdp10-dec-tops20
     1104        exit 0 ;;
     1105    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
     1106        echo pdp10-xkl-tops20
     1107        exit 0 ;;
     1108    *:TOPS-20:*:*)
     1109        echo pdp10-unknown-tops20
     1110        exit 0 ;;
     1111    *:ITS:*:*)
     1112        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
    9791119        exit 0 ;;
    9801120esac
    9811121
    9821122#echo '(No uname command or uname output not recognized.)' 1>&2
    9831123#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
    9841124
     1125eval $set_cc_for_build
    9851126cat >$dummy.c <<EOF
    9861127#ifdef _SEQUENT_
    9871128# include <sys/types.h>
     
    10681209#endif
    10691210
    10701211#if defined (vax)
    1071 #if !defined (ultrix)
    1072   printf ("vax-dec-bsd\n"); exit (0);
    1073 #else
    1074   printf ("vax-dec-ultrix\n"); exit (0);
    1075 #endif
     1212# if !defined (ultrix)
     1213#  include <sys/param.h>
     1214#  if defined (BSD)
     1215#   if BSD == 43
     1216      printf ("vax-dec-bsd4.3\n"); exit (0);
     1217#   else
     1218#    if BSD == 199006
     1219      printf ("vax-dec-bsd4.3reno\n"); exit (0);
     1220#    else
     1221      printf ("vax-dec-bsd\n"); exit (0);
     1222#    endif
     1223#   endif
     1224#  else
     1225    printf ("vax-dec-bsd\n"); exit (0);
     1226#  endif
     1227# else
     1228    printf ("vax-dec-ultrix\n"); exit (0);
     1229# endif
    10761230#endif
    10771231
    10781232#if defined (alliant) && defined (i860)
     
    10831237}
    10841238EOF
    10851239
    1086 $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm $dummy.c $dummy && exit 0
     1240$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
    10871241rm -f $dummy.c $dummy
    10881242
    10891243# Apollos put the system type in the environment.
     
    11161270    esac
    11171271fi
    11181272
    1119 #echo '(Unable to guess system type)' 1>&2
     1273cat >&2 <<EOF
     1274$0: unable to guess system type
     1275
     1276This script, last modified $timestamp, has failed to recognize
     1277the operating system you are using. It is advised that you
     1278download the most up to date version of the config scripts from
     1279
     1280    ftp://ftp.gnu.org/pub/gnu/config/
     1281
     1282If the version you run ($0) is already up to date, please
     1283send the following data and any information you think might be
     1284pertinent to <config-patches@gnu.org> in order to provide the needed
     1285information to handle your system.
     1286
     1287config.guess timestamp = $timestamp
     1288
     1289uname -m = `(uname -m) 2>/dev/null || echo unknown`
     1290uname -r = `(uname -r) 2>/dev/null || echo unknown`
     1291uname -s = `(uname -s) 2>/dev/null || echo unknown`
     1292uname -v = `(uname -v) 2>/dev/null || echo unknown`
     1293
     1294/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
     1295/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
     1296
     1297hostinfo               = `(hostinfo) 2>/dev/null`
     1298/bin/universe          = `(/bin/universe) 2>/dev/null`
     1299/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
     1300/bin/arch              = `(/bin/arch) 2>/dev/null`
     1301/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
     1302/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
     1303
     1304UNAME_MACHINE = ${UNAME_MACHINE}
     1305UNAME_RELEASE = ${UNAME_RELEASE}
     1306UNAME_SYSTEM  = ${UNAME_SYSTEM}
     1307UNAME_VERSION = ${UNAME_VERSION}
     1308EOF
    11201309
    11211310exit 1
     1311
     1312# Local variables:
     1313# eval: (add-hook 'write-file-hooks 'time-stamp)
     1314# time-stamp-start: "timestamp='"
     1315# time-stamp-format: "%:y-%02m-%02d"
     1316# time-stamp-end: "'"
     1317# End:
  • config.sub

    diff -uNr glib-1.2.10/config.sub glib-1.2.10-mod/config.sub
    old new  
    11#! /bin/sh
    2 # Configuration validation subroutine script, version 1.1.
    3 #   Copyright (C) 1991, 92-97, 1998, 1999 Free Software Foundation, Inc.
     2# Configuration validation subroutine script.
     3#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
     4#   Free Software Foundation, Inc.
     5
     6timestamp='2001-09-07'
     7
    48# This file is (in principle) common to ALL GNU software.
    59# The presence of a machine in this file suggests that SOME GNU software
    610# can handle that machine.  It does not imply ALL GNU software can.
     
    2529# configuration script generated by Autoconf, you may include it under
    2630# the same distribution terms that you use for the rest of that program.
    2731
     32# Please send patches to <config-patches@gnu.org>.
     33#
    2834# Configuration subroutine to validate and canonicalize a configuration type.
    2935# Supply the specified configuration type as an argument.
    3036# If it is invalid, we print an error message on stderr and exit with code 1.
     
    4551#       CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
    4652# It is wrong to echo any other type of specification.
    4753
    48 if [ x$1 = x ]
    49 then
    50         echo Configuration name missing. 1>&2
    51         echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
    52         echo "or     $0 ALIAS" 1>&2
    53         echo where ALIAS is a recognized configuration type. 1>&2
    54         exit 1
    55 fi
     54me=`echo "$0" | sed -e 's,.*/,,'`
    5655
    57 # First pass through any local machine types.
    58 case $1 in
    59         *local*)
    60                 echo $1
    61                 exit 0
    62                 ;;
    63         *)
    64         ;;
     56usage="\
     57Usage: $0 [OPTION] CPU-MFR-OPSYS
     58       $0 [OPTION] ALIAS
     59
     60Canonicalize a configuration name.
     61
     62Operation modes:
     63  -h, --help         print this help, then exit
     64  -t, --time-stamp   print date of last modification, then exit
     65  -v, --version      print version number, then exit
     66
     67Report bugs and patches to <config-patches@gnu.org>."
     68
     69version="\
     70GNU config.sub ($timestamp)
     71
     72Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
     73Free Software Foundation, Inc.
     74
     75This is free software; see the source for copying conditions.  There is NO
     76warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
     77
     78help="
     79Try \`$me --help' for more information."
     80
     81# Parse command line
     82while test $# -gt 0 ; do
     83  case $1 in
     84    --time-stamp | --time* | -t )
     85       echo "$timestamp" ; exit 0 ;;
     86    --version | -v )
     87       echo "$version" ; exit 0 ;;
     88    --help | --h* | -h )
     89       echo "$usage"; exit 0 ;;
     90    -- )     # Stop option processing
     91       shift; break ;;
     92    - ) # Use stdin as input.
     93       break ;;
     94    -* )
     95       echo "$me: invalid option $1$help"
     96       exit 1 ;;
     97
     98    *local*)
     99       # First pass through any local machine types.
     100       echo $1
     101       exit 0;;
     102
     103    * )
     104       break ;;
     105  esac
     106done
     107
     108case $# in
     109 0) echo "$me: missing argument$help" >&2
     110    exit 1;;
     111 1) ;;
     112 *) echo "$me: too many arguments$help" >&2
     113    exit 1;;
    65114esac
    66115
    67116# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
    68117# Here we must recognize all the valid KERNEL-OS combinations.
    69118maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
    70119case $maybe_os in
    71   linux-gnu*)
     120  nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*)
    72121    os=-$maybe_os
    73122    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
    74123    ;;
     
    94143        -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
    95144        -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
    96145        -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
    97         -apple)
     146        -apple | -axis)
    98147                os=
    99148                basic_machine=$1
    100149                ;;
     
    108157                os=-vxworks
    109158                basic_machine=$1
    110159                ;;
     160        -chorusos*)
     161                os=-chorusos
     162                basic_machine=$1
     163                ;;
     164        -chorusrdb)
     165                os=-chorusrdb
     166                basic_machine=$1
     167                ;;
    111168        -hiux*)
    112169                os=-hiuxwe2
    113170                ;;
     
    166223case $basic_machine in
    167224        # Recognize the basic CPU types without company name.
    168225        # Some are omitted here because they have special meanings below.
    169         tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
    170                 | arme[lb] | pyramid | mn10200 | mn10300 | tron | a29k \
    171                 | 580 | i960 | h8300 \
    172                 | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
    173                 | alpha | alphaev[4-7] | alphaev56 | alphapca5[67] \
    174                 | we32k | ns16k | clipper | i370 | sh | powerpc | powerpcle \
    175                 | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \
    176                 | mips64orion | mips64orionel | mipstx39 | mipstx39el \
    177                 | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
    178                 | mips64vr5000 | miprs64vr5000el | mcore \
    179                 | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
    180                 | thumb | d10v | fr30)
     226        1750a | 580 \
     227        | a29k \
     228        | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
     229        | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
     230        | c4x | clipper \
     231        | d10v | d30v | dsp16xx \
     232        | fr30 \
     233        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
     234        | i370 | i860 | i960 | ia64 \
     235        | m32r | m68000 | m68k | m88k | mcore \
     236        | mips16 | mips64 | mips64el | mips64orion | mips64orionel \
     237        | mips64vr4100 | mips64vr4100el | mips64vr4300 \
     238        | mips64vr4300el | mips64vr5000 | mips64vr5000el \
     239        | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
     240        | mipsisa32 \
     241        | mn10200 | mn10300 \
     242        | ns16k | ns32k \
     243        | openrisc \
     244        | pdp10 | pdp11 | pj | pjl \
     245        | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
     246        | pyramid \
     247        | s390 | s390x \
     248        | sh | sh[34] | sh[34]eb | shbe | shle \
     249        | sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \
     250        | stormy16 | strongarm \
     251        | tahoe | thumb | tic80 | tron \
     252        | v850 \
     253        | we32k \
     254        | x86 | xscale \
     255        | z8k)
    181256                basic_machine=$basic_machine-unknown
    182257                ;;
    183         m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | h8500 | w65 | pj | pjl)
     258        m6811 | m68hc11 | m6812 | m68hc12)
     259                # Motorola 68HC11/12.
     260                basic_machine=$basic_machine-unknown
     261                os=-none
     262                ;;
     263        m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
    184264                ;;
    185265
    186266        # We use `pc' rather than `unknown'
    187267        # because (1) that's what they normally are, and
    188268        # (2) the word "unknown" tends to confuse beginning users.
    189         i[34567]86)
     269        i*86 | x86_64)
    190270          basic_machine=$basic_machine-pc
    191271          ;;
    192272        # Object if more than one company name word.
     
    195275                exit 1
    196276                ;;
    197277        # Recognize the basic CPU types with company name.
    198         # FIXME: clean up the formatting here.
    199         vax-* | tahoe-* | i[34567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
    200               | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | arm-* | c[123]* \
    201               | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
    202               | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
    203               | xmp-* | ymp-* \
    204               | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* | hppa2.0n-* \
    205               | alpha-* | alphaev[4-7]-* | alphaev56-* | alphapca5[67]-* \
    206               | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
    207               | clipper-* | orion-* \
    208               | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
    209               | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
    210               | mips64el-* | mips64orion-* | mips64orionel-* \
    211               | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
    212               | mipstx39-* | mipstx39el-* | mcore-* \
    213               | f301-* | armv*-* | t3e-* \
    214               | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
    215               | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* )
     278        580-* \
     279        | a29k-* \
     280        | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
     281        | alphapca5[67]-* | arc-* \
     282        | arm-*  | armbe-* | armle-* | armv*-* \
     283        | bs2000-* \
     284        | c[123]* | c30-* | [cjt]90-* | c54x-* \
     285        | clipper-* | cray2-* | cydra-* \
     286        | d10v-* | d30v-* \
     287        | elxsi-* \
     288        | f30[01]-* | f700-* | fr30-* | fx80-* \
     289        | h8300-* | h8500-* \
     290        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
     291        | i*86-* | i860-* | i960-* | ia64-* \
     292        | m32r-* \
     293        | m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \
     294        | m88110-* | m88k-* | mcore-* \
     295        | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
     296        | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
     297        | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
     298        | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
     299        | none-* | np1-* | ns16k-* | ns32k-* \
     300        | orion-* \
     301        | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
     302        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
     303        | pyramid-* \
     304        | romp-* | rs6000-* \
     305        | s390-* | s390x-* \
     306        | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \
     307        | sparc-* | sparc64-* | sparc86x-* | sparclite-* \
     308        | sparcv9-* | sparcv9b-* | stormy16-* | strongarm-* | sv1-* \
     309        | t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
     310        | v850-* | vax-* \
     311        | we32k-* \
     312        | x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \
     313        | ymp-* \
     314        | z8k-*)
    216315                ;;
    217316        # Recognize the various machine names and aliases which stand
    218317        # for a CPU type and a company and sometimes even an OS.
     
    249348                os=-sysv
    250349                ;;
    251350        amiga | amiga-*)
    252                 basic_machine=m68k-cbm
     351                basic_machine=m68k-unknown
    253352                ;;
    254353        amigaos | amigados)
    255                 basic_machine=m68k-cbm
     354                basic_machine=m68k-unknown
    256355                os=-amigaos
    257356                ;;
    258357        amigaunix | amix)
    259                 basic_machine=m68k-cbm
     358                basic_machine=m68k-unknown
    260359                os=-sysv4
    261360                ;;
    262361        apollo68)
     
    303402                basic_machine=cray2-cray
    304403                os=-unicos
    305404                ;;
    306         [ctj]90-cray)
    307                 basic_machine=c90-cray
     405        [cjt]90)
     406                basic_machine=${basic_machine}-cray
    308407                os=-unicos
    309408                ;;
    310409        crds | unos)
    311410                basic_machine=m68k-crds
    312411                ;;
     412        cris | cris-* | etrax*)
     413                basic_machine=cris-axis
     414                ;;
    313415        da30 | da30-*)
    314416                basic_machine=m68k-da30
    315417                ;;
     
    357459                basic_machine=tron-gmicro
    358460                os=-sysv
    359461                ;;
     462        go32)
     463                basic_machine=i386-pc
     464                os=-go32
     465                ;;
    360466        h3050r* | hiux*)
    361467                basic_machine=hppa1.1-hitachi
    362468                os=-hiuxwe2
     
    432538                basic_machine=i370-ibm
    433539                ;;
    434540# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
    435         i[34567]86v32)
     541        i*86v32)
    436542                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
    437543                os=-sysv32
    438544                ;;
    439         i[34567]86v4*)
     545        i*86v4*)
    440546                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
    441547                os=-sysv4
    442548                ;;
    443         i[34567]86v)
     549        i*86v)
    444550                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
    445551                os=-sysv
    446552                ;;
    447         i[34567]86sol2)
     553        i*86sol2)
    448554                basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
    449555                os=-solaris2
    450556                ;;
     
    456562                basic_machine=i386-unknown
    457563                os=-vsta
    458564                ;;
    459         i386-go32 | go32)
    460                 basic_machine=i386-unknown
    461                 os=-go32
    462                 ;;
    463         i386-mingw32 | mingw32)
    464                 basic_machine=i386-unknown
    465                 os=-mingw32
    466                 ;;
    467         i386-qnx | qnx)
    468                 basic_machine=i386-qnx
    469                 ;;
    470565        iris | iris4d)
    471566                basic_machine=mips-sgi
    472567                case $os in
     
    492587                basic_machine=ns32k-utek
    493588                os=-sysv
    494589                ;;
     590        mingw32)
     591                basic_machine=i386-pc
     592                os=-mingw32
     593                ;;
    495594        miniframe)
    496595                basic_machine=m68000-convergent
    497596                ;;
     
    513612        mips3*)
    514613                basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
    515614                ;;
     615        mmix*)
     616                basic_machine=mmix-knuth
     617                os=-mmixware
     618                ;;
    516619        monitor)
    517620                basic_machine=m68k-rom68k
    518621                os=-coff
    519622                ;;
    520623        msdos)
    521                 basic_machine=i386-unknown
     624                basic_machine=i386-pc
    522625                os=-msdos
    523626                ;;
    524627        mvs)
     
    582685                basic_machine=i960-intel
    583686                os=-mon960
    584687                ;;
     688        nonstopux)
     689                basic_machine=mips-compaq
     690                os=-nonstopux
     691                ;;
    585692        np1)
    586693                basic_machine=np1-gould
    587694                ;;
     695        nsr-tandem)
     696                basic_machine=nsr-tandem
     697                ;;
    588698        op50n-* | op60c-*)
    589699                basic_machine=hppa1.1-oki
    590700                os=-proelf
     
    614724        pc532 | pc532-*)
    615725                basic_machine=ns32k-pc532
    616726                ;;
    617         pentium | p5 | k5 | k6 | nexen)
     727        pentium | p5 | k5 | k6 | nexgen)
    618728                basic_machine=i586-pc
    619729                ;;
    620         pentiumpro | p6 | 6x86)
     730        pentiumpro | p6 | 6x86 | athlon)
    621731                basic_machine=i686-pc
    622732                ;;
    623733        pentiumii | pentium2)
    624                 basic_machine=i786-pc
     734                basic_machine=i686-pc
    625735                ;;
    626         pentium-* | p5-* | k5-* | k6-* | nexen-*)
     736        pentium-* | p5-* | k5-* | k6-* | nexgen-*)
    627737                basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
    628738                ;;
    629         pentiumpro-* | p6-* | 6x86-*)
     739        pentiumpro-* | p6-* | 6x86-* | athlon-*)
    630740                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
    631741                ;;
    632742        pentiumii-* | pentium2-*)
    633                 basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
     743                basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
    634744                ;;
    635745        pn)
    636746                basic_machine=pn-gould
    637747                ;;
    638         power)  basic_machine=rs6000-ibm
     748        power)  basic_machine=power-ibm
    639749                ;;
    640750        ppc)    basic_machine=powerpc-unknown
    641751                ;;
     
    647757        ppcle-* | powerpclittle-*)
    648758                basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
    649759                ;;
     760        ppc64)  basic_machine=powerpc64-unknown
     761                ;;
     762        ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
     763                ;;
     764        ppc64le | powerpc64little | ppc64-le | powerpc64-little)
     765                basic_machine=powerpc64le-unknown
     766                ;;
     767        ppc64le-* | powerpc64little-*)
     768                basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
     769                ;;
    650770        ps2)
    651771                basic_machine=i386-ibm
    652772                ;;
     773        pw32)
     774                basic_machine=i586-unknown
     775                os=-pw32
     776                ;;
    653777        rom68k)
    654778                basic_machine=m68k-rom68k
    655779                os=-coff
     
    729853        sun386 | sun386i | roadrunner)
    730854                basic_machine=i386-sun
    731855                ;;
     856        sv1)
     857                basic_machine=sv1-cray
     858                os=-unicos
     859                ;;
    732860        symmetry)
    733861                basic_machine=i386-sequent
    734862                os=-dynix
     
    737865                basic_machine=t3e-cray
    738866                os=-unicos
    739867                ;;
     868        tic54x | c54x*)
     869                basic_machine=tic54x-unknown
     870                os=-coff
     871                ;;
    740872        tx39)
    741873                basic_machine=mipstx39-unknown
    742874                ;;
     
    789921                basic_machine=hppa1.1-winbond
    790922                os=-proelf
    791923                ;;
     924        windows32)
     925                basic_machine=i386-pc
     926                os=-windows32-msvcrt
     927                ;;
    792928        xmp)
    793929                basic_machine=xmp-cray
    794930                os=-unicos
     
    832968        vax)
    833969                basic_machine=vax-dec
    834970                ;;
     971        pdp10)
     972                # there are many clones, so DEC is not a safe bet
     973                basic_machine=pdp10-unknown
     974                ;;
    835975        pdp11)
    836976                basic_machine=pdp11-dec
    837977                ;;
    838978        we32k)
    839979                basic_machine=we32k-att
    840980                ;;
    841         sparc | sparcv9)
     981        sh3 | sh4 | sh3eb | sh4eb)
     982                basic_machine=sh-unknown
     983                ;;
     984        sparc | sparcv9 | sparcv9b)
    842985                basic_machine=sparc-sun
    843986                ;;
    844987        cydra)
     
    8601003                basic_machine=c4x-none
    8611004                os=-coff
    8621005                ;;
     1006        *-unknown)
     1007                # Make sure to match an already-canonicalized machine name.
     1008                ;;
    8631009        *)
    8641010                echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
    8651011                exit 1
     
    9161062              | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
    9171063              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
    9181064              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
     1065              | -chorusos* | -chorusrdb* \
    9191066              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
    9201067              | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
    921               | -interix* | -uwin* | -rhapsody* | -opened* | -openstep* | -oskit*)
     1068              | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
     1069              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
     1070              | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
     1071              | -os2* | -vos*)
    9221072        # Remember, each alternative MUST END IN *, to match a version number.
    9231073                ;;
     1074        -qnx*)
     1075                case $basic_machine in
     1076                    x86-* | i*86-*)
     1077                        ;;
     1078                    *)
     1079                        os=-nto$os
     1080                        ;;
     1081                esac
     1082                ;;
     1083        -nto*)
     1084                os=-nto-qnx
     1085                ;;
    9241086        -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
    9251087              | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
    926               | -macos* | -mpw* | -magic* | -mon960* | -lnews*)
     1088              | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
    9271089                ;;
    9281090        -mac*)
    9291091                os=`echo $os | sed -e 's|mac|macos|'`
     
    9401102        -opened*)
    9411103                os=-openedition
    9421104                ;;
     1105        -wince*)
     1106                os=-wince
     1107                ;;
    9431108        -osfrose*)
    9441109                os=-osfrose
    9451110                ;;
     
    9641129        -ns2 )
    9651130                os=-nextstep2
    9661131                ;;
     1132        -nsk*)
     1133                os=-nsk
     1134                ;;
    9671135        # Preserve the version number of sinix5.
    9681136        -sinix5.*)
    9691137                os=`echo $os | sed -e 's|sinix|sysv|'`
     
    9771145        -oss*)
    9781146                os=-sysv3
    9791147                ;;
    980         -qnx)
    981                 os=-qnx4
    982                 ;;
    9831148        -svr4)
    9841149                os=-sysv4
    9851150                ;;
     
    10011166        -xenix)
    10021167                os=-xenix
    10031168                ;;
    1004         -*mint | -*MiNT)
     1169        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
    10051170                os=-mint
    10061171                ;;
    10071172        -none)
     
    10351200        arm*-semi)
    10361201                os=-aout
    10371202                ;;
     1203        pdp10-*)
     1204                os=-tops20
     1205                ;;
    10381206        pdp11-*)
    10391207                os=-none
    10401208                ;;
     
    11431311        *-masscomp)
    11441312                os=-rtu
    11451313                ;;
    1146         f301-fujitsu)
     1314        f30[01]-fujitsu | f700-fujitsu)
    11471315                os=-uxpv
    11481316                ;;
    11491317        *-rom68k)
     
    12211389                        -mpw* | -macos*)
    12221390                                vendor=apple
    12231391                                ;;
    1224                         -*mint | -*MiNT)
     1392                        -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
    12251393                                vendor=atari
    12261394                                ;;
     1395                        -vos*)
     1396                                vendor=stratus
     1397                                ;;
    12271398                esac
    12281399                basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
    12291400                ;;
    12301401esac
    12311402
    12321403echo $basic_machine$os
     1404exit 0
     1405
     1406# Local variables:
     1407# eval: (add-hook 'write-file-hooks 'time-stamp)
     1408# time-stamp-start: "timestamp='"
     1409# time-stamp-format: "%:y-%02m-%02d"
     1410# time-stamp-end: "'"
     1411# End:
Note: See TracBrowser for help on using the repository browser.