~apachelogger/+junk/plymouth-stop-kdm

« back to all changes in this revision

Viewing changes to build-tools/config.guess

  • Committer: Scott James Remnant
  • Date: 2010-03-25 16:44:25 UTC
  • mfrom: (1016.2.1 upstream)
  • Revision ID: scott@netsplit.com-20100325164425-daotztzazohftmt4
Merge upstream 0.8.1 release

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
5
5
#   Free Software Foundation, Inc.
6
6
 
7
 
timestamp='2009-06-10'
 
7
timestamp='2009-11-20'
8
8
 
9
9
# This file is free software; you can redistribute it and/or modify it
10
10
# under the terms of the GNU General Public License as published by
27
27
# the same distribution terms that you use for the rest of that program.
28
28
 
29
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.
 
30
# Originally written by Per Bothner.  Please send patches (context
 
31
# diff format) to <config-patches@gnu.org> and include a ChangeLog
 
32
# entry.
33
33
#
34
34
# This script attempts to guess a canonical system name similar to
35
35
# config.sub.  If it succeeds, it prints the system name on stdout, and
36
36
# exits with 0.  Otherwise, it exits with 1.
37
37
#
38
 
# The plan is that this can be called by configure scripts if you
39
 
# don't specify an explicit build system type.
 
38
# You can get the latest version of this script from:
 
39
# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
40
40
 
41
41
me=`echo "$0" | sed -e 's,.*/,,'`
42
42
 
333
333
    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
334
334
        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
335
335
        exit ;;
 
336
    i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
 
337
        echo i386-pc-auroraux${UNAME_RELEASE}
 
338
        exit ;;
336
339
    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
337
340
        eval $set_cc_for_build
338
341
        SUN_ARCH="i386"
807
810
    i*:PW*:*)
808
811
        echo ${UNAME_MACHINE}-pc-pw32
809
812
        exit ;;
810
 
    *:Interix*:[3456]*)
 
813
    *:Interix*:*)
811
814
        case ${UNAME_MACHINE} in
812
815
            x86)
813
816
                echo i586-pc-interix${UNAME_RELEASE}
814
817
                exit ;;
815
 
            EM64T | authenticamd | genuineintel)
 
818
            authenticamd | genuineintel | EM64T)
816
819
                echo x86_64-unknown-interix${UNAME_RELEASE}
817
820
                exit ;;
818
821
            IA64)
854
857
    i*86:Minix:*:*)
855
858
        echo ${UNAME_MACHINE}-pc-minix
856
859
        exit ;;
 
860
    alpha:Linux:*:*)
 
861
        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
 
862
          EV5)   UNAME_MACHINE=alphaev5 ;;
 
863
          EV56)  UNAME_MACHINE=alphaev56 ;;
 
864
          PCA56) UNAME_MACHINE=alphapca56 ;;
 
865
          PCA57) UNAME_MACHINE=alphapca56 ;;
 
866
          EV6)   UNAME_MACHINE=alphaev6 ;;
 
867
          EV67)  UNAME_MACHINE=alphaev67 ;;
 
868
          EV68*) UNAME_MACHINE=alphaev68 ;;
 
869
        esac
 
870
        objdump --private-headers /bin/sh | grep -q ld.so.1
 
871
        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
 
872
        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
 
873
        exit ;;
857
874
    arm*:Linux:*:*)
858
875
        eval $set_cc_for_build
859
876
        if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
876
893
    frv:Linux:*:*)
877
894
        echo frv-unknown-linux-gnu
878
895
        exit ;;
 
896
    i*86:Linux:*:*)
 
897
        LIBC=gnu
 
898
        eval $set_cc_for_build
 
899
        sed 's/^        //' << EOF >$dummy.c
 
900
        #ifdef __dietlibc__
 
901
        LIBC=dietlibc
 
902
        #endif
 
903
EOF
 
904
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
 
905
        echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
 
906
        exit ;;
879
907
    ia64:Linux:*:*)
880
908
        echo ${UNAME_MACHINE}-unknown-linux-gnu
881
909
        exit ;;
901
929
        #endif
902
930
        #endif
903
931
EOF
904
 
        eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
905
 
            /^CPU/{
906
 
                s: ::g
907
 
                p
908
 
            }'`"
 
932
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
909
933
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
910
934
        ;;
911
935
    or32:Linux:*:*)
912
936
        echo or32-unknown-linux-gnu
913
937
        exit ;;
914
 
    ppc:Linux:*:*)
915
 
        echo powerpc-unknown-linux-gnu
916
 
        exit ;;
917
 
    ppc64:Linux:*:*)
918
 
        echo powerpc64-unknown-linux-gnu
919
 
        exit ;;
920
 
    alpha:Linux:*:*)
921
 
        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
922
 
          EV5)   UNAME_MACHINE=alphaev5 ;;
923
 
          EV56)  UNAME_MACHINE=alphaev56 ;;
924
 
          PCA56) UNAME_MACHINE=alphapca56 ;;
925
 
          PCA57) UNAME_MACHINE=alphapca56 ;;
926
 
          EV6)   UNAME_MACHINE=alphaev6 ;;
927
 
          EV67)  UNAME_MACHINE=alphaev67 ;;
928
 
          EV68*) UNAME_MACHINE=alphaev68 ;;
929
 
        esac
930
 
        objdump --private-headers /bin/sh | grep -q ld.so.1
931
 
        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
932
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
933
 
        exit ;;
934
938
    padre:Linux:*:*)
935
939
        echo sparc-unknown-linux-gnu
936
940
        exit ;;
 
941
    parisc64:Linux:*:* | hppa64:Linux:*:*)
 
942
        echo hppa64-unknown-linux-gnu
 
943
        exit ;;
937
944
    parisc:Linux:*:* | hppa:Linux:*:*)
938
945
        # Look for CPU level
939
946
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
942
949
          *)    echo hppa-unknown-linux-gnu ;;
943
950
        esac
944
951
        exit ;;
945
 
    parisc64:Linux:*:* | hppa64:Linux:*:*)
946
 
        echo hppa64-unknown-linux-gnu
 
952
    ppc64:Linux:*:*)
 
953
        echo powerpc64-unknown-linux-gnu
 
954
        exit ;;
 
955
    ppc:Linux:*:*)
 
956
        echo powerpc-unknown-linux-gnu
947
957
        exit ;;
948
958
    s390:Linux:*:* | s390x:Linux:*:*)
949
959
        echo ${UNAME_MACHINE}-ibm-linux
966
976
    xtensa*:Linux:*:*)
967
977
        echo ${UNAME_MACHINE}-unknown-linux-gnu
968
978
        exit ;;
969
 
    i*86:Linux:*:*)
970
 
        # The BFD linker knows what the default object file format is, so
971
 
        # first see if it will tell us. cd to the root directory to prevent
972
 
        # problems with other programs or directories called `ld' in the path.
973
 
        # Set LC_ALL=C to ensure ld outputs messages in English.
974
 
        ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
975
 
                         | sed -ne '/supported targets:/!d
976
 
                                    s/[         ][      ]*/ /g
977
 
                                    s/.*supported targets: *//
978
 
                                    s/ .*//
979
 
                                    p'`
980
 
        case "$ld_supported_targets" in
981
 
          elf32-i386)
982
 
                TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
983
 
                ;;
984
 
        esac
985
 
        # Determine whether the default compiler is a.out or elf
986
 
        eval $set_cc_for_build
987
 
        sed 's/^        //' << EOF >$dummy.c
988
 
        #include <features.h>
989
 
        #ifdef __ELF__
990
 
        # ifdef __GLIBC__
991
 
        #  if __GLIBC__ >= 2
992
 
        LIBC=gnu
993
 
        #  else
994
 
        LIBC=gnulibc1
995
 
        #  endif
996
 
        # else
997
 
        LIBC=gnulibc1
998
 
        # endif
999
 
        #else
1000
 
        #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
1001
 
        LIBC=gnu
1002
 
        #else
1003
 
        LIBC=gnuaout
1004
 
        #endif
1005
 
        #endif
1006
 
        #ifdef __dietlibc__
1007
 
        LIBC=dietlibc
1008
 
        #endif
1009
 
EOF
1010
 
        eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
1011
 
            /^LIBC/{
1012
 
                s: ::g
1013
 
                p
1014
 
            }'`"
1015
 
        test x"${LIBC}" != x && {
1016
 
                echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
1017
 
                exit
1018
 
        }
1019
 
        test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
1020
 
        ;;
1021
979
    i*86:DYNIX/ptx:4*:*)
1022
980
        # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
1023
981
        # earlier versions are messed up and put the nodename in both
1247
1205
    *:Darwin:*:*)
1248
1206
        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1249
1207
        case $UNAME_PROCESSOR in
 
1208
            i386)
 
1209
                eval $set_cc_for_build
 
1210
                if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
 
1211
                  if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
 
1212
                      (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
 
1213
                      grep IS_64BIT_ARCH >/dev/null
 
1214
                  then
 
1215
                      UNAME_PROCESSOR="x86_64"
 
1216
                  fi
 
1217
                fi ;;
1250
1218
            unknown) UNAME_PROCESSOR=powerpc ;;
1251
1219
        esac
1252
1220
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}