~ubuntu-branches/ubuntu/trusty/gnome-schedule/trusty

« back to all changes in this revision

Viewing changes to config.guess

  • Committer: Bazaar Package Importer
  • Author(s): Simon McVittie
  • Date: 2008-06-29 16:49:41 UTC
  • mfrom: (3.1.7 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080629164941-pc30216r5plr96b9
Tags: 2.0.2-1.1
* Non-maintainer upload from the Cambridge BSP.
* Apply patch from Chris Lamb to fix bashisms in debian/rules.
  (goal-dash, closes: #484386)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! /bin/sh
2
2
# Attempt to guess a canonical system name.
3
3
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
 
#   2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
5
 
#   Inc.
 
4
#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
 
5
#   Free Software Foundation, Inc.
6
6
 
7
 
timestamp='2006-07-02'
 
7
timestamp='2008-01-23'
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
56
56
GNU config.guess ($timestamp)
57
57
 
58
58
Originally written by Per Bothner.
59
 
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
60
 
Free Software Foundation, Inc.
 
59
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
 
60
2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
61
61
 
62
62
This is free software; see the source for copying conditions.  There is NO
63
63
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
139
139
UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
140
140
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
141
141
 
 
142
if [ "${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
 
155
EOF
 
156
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'`
 
157
fi
 
158
 
142
159
# Note: order is significant - the case branches are not exclusive.
143
160
 
144
161
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
161
178
            arm*) machine=arm-unknown ;;
162
179
            sh3el) machine=shl-unknown ;;
163
180
            sh3eb) machine=sh-unknown ;;
 
181
            sh5el) machine=sh5le-unknown ;;
164
182
            *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
165
183
        esac
166
184
        # The Operating System including object format, if it has switched
329
347
    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
330
348
        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
331
349
        exit ;;
332
 
    i86pc:SunOS:5.*:*)
 
350
    i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
333
351
        echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
334
352
        exit ;;
335
353
    sun4*:SunOS:6*:*)
531
549
                echo rs6000-ibm-aix3.2
532
550
        fi
533
551
        exit ;;
534
 
    *:AIX:*:[45])
 
552
    *:AIX:*:[456])
535
553
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
536
554
        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
537
555
                IBM_ARCH=rs6000
780
798
    i*:CYGWIN*:*)
781
799
        echo ${UNAME_MACHINE}-pc-cygwin
782
800
        exit ;;
783
 
    i*:MINGW*:*)
 
801
    *:MINGW*:*)
784
802
        echo ${UNAME_MACHINE}-pc-mingw32
785
803
        exit ;;
786
804
    i*:windows32*:*)
790
808
    i*:PW*:*)
791
809
        echo ${UNAME_MACHINE}-pc-pw32
792
810
        exit ;;
793
 
    x86:Interix*:[3456]*)
794
 
        echo i586-pc-interix${UNAME_RELEASE}
795
 
        exit ;;
796
 
    EM64T:Interix*:[3456]*)
797
 
        echo x86_64-unknown-interix${UNAME_RELEASE}
798
 
        exit ;;
 
811
    *:Interix*:[3456]*)
 
812
        case ${UNAME_MACHINE} in
 
813
            x86)
 
814
                echo i586-pc-interix${UNAME_RELEASE}
 
815
                exit ;;
 
816
            EM64T | authenticamd)
 
817
                echo x86_64-unknown-interix${UNAME_RELEASE}
 
818
                exit ;;
 
819
            IA64)
 
820
                echo ia64-unknown-interix${UNAME_RELEASE}
 
821
                exit ;;
 
822
        esac ;;
799
823
    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
800
824
        echo i${UNAME_MACHINE}-pc-mks
801
825
        exit ;;
829
853
        echo ${UNAME_MACHINE}-pc-minix
830
854
        exit ;;
831
855
    arm*:Linux:*:*)
832
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
856
        eval $set_cc_for_build
 
857
        if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
 
858
            | grep -q __ARM_EABI__
 
859
        then
 
860
            echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 
861
        else
 
862
            echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
 
863
        fi
833
864
        exit ;;
834
865
    avr32*:Linux:*:*)
835
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
866
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
836
867
        exit ;;
837
868
    cris:Linux:*:*)
838
 
        echo cris-axis-linux-gnu
 
869
        echo cris-axis-linux-${LIBC}
839
870
        exit ;;
840
871
    crisv32:Linux:*:*)
841
 
        echo crisv32-axis-linux-gnu
 
872
        echo crisv32-axis-linux-${LIBC}
842
873
        exit ;;
843
874
    frv:Linux:*:*)
844
 
        echo frv-unknown-linux-gnu
 
875
        echo frv-unknown-linux-${LIBC}
845
876
        exit ;;
846
877
    ia64:Linux:*:*)
847
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
878
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
848
879
        exit ;;
849
880
    m32r*:Linux:*:*)
850
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
881
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
851
882
        exit ;;
852
883
    m68*:Linux:*:*)
853
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
884
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
854
885
        exit ;;
855
886
    mips:Linux:*:*)
856
887
        eval $set_cc_for_build
873
904
                s: ::g
874
905
                p
875
906
            }'`"
876
 
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
 
907
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
877
908
        ;;
878
909
    mips64:Linux:*:*)
879
910
        eval $set_cc_for_build
896
927
                s: ::g
897
928
                p
898
929
            }'`"
899
 
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
 
930
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
900
931
        ;;
901
932
    or32:Linux:*:*)
902
 
        echo or32-unknown-linux-gnu
 
933
        echo or32-unknown-linux-${LIBC}
903
934
        exit ;;
904
935
    ppc:Linux:*:*)
905
 
        echo powerpc-unknown-linux-gnu
 
936
        echo powerpc-unknown-linux-${LIBC}
906
937
        exit ;;
907
938
    ppc64:Linux:*:*)
908
 
        echo powerpc64-unknown-linux-gnu
 
939
        echo powerpc64-unknown-linux-${LIBC}
909
940
        exit ;;
910
941
    alpha:Linux:*:*)
911
942
        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
918
949
          EV68*) UNAME_MACHINE=alphaev68 ;;
919
950
        esac
920
951
        objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
921
 
        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
922
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
 
952
        if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
 
953
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
923
954
        exit ;;
924
955
    parisc:Linux:*:* | hppa:Linux:*:*)
925
956
        # Look for CPU level
926
957
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
927
 
          PA7*) echo hppa1.1-unknown-linux-gnu ;;
928
 
          PA8*) echo hppa2.0-unknown-linux-gnu ;;
929
 
          *)    echo hppa-unknown-linux-gnu ;;
 
958
          PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
 
959
          PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
 
960
          *)    echo hppa-unknown-linux-${LIBC} ;;
930
961
        esac
931
962
        exit ;;
932
963
    parisc64:Linux:*:* | hppa64:Linux:*:*)
933
 
        echo hppa64-unknown-linux-gnu
 
964
        echo hppa64-unknown-linux-${LIBC}
934
965
        exit ;;
935
966
    s390:Linux:*:* | s390x:Linux:*:*)
936
967
        echo ${UNAME_MACHINE}-ibm-linux
937
968
        exit ;;
938
969
    sh64*:Linux:*:*)
939
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
970
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
940
971
        exit ;;
941
972
    sh*:Linux:*:*)
942
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
973
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
943
974
        exit ;;
944
975
    sparc:Linux:*:* | sparc64:Linux:*:*)
945
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
976
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
946
977
        exit ;;
947
978
    vax:Linux:*:*)
948
 
        echo ${UNAME_MACHINE}-dec-linux-gnu
 
979
        echo ${UNAME_MACHINE}-dec-linux-${LIBC}
949
980
        exit ;;
950
981
    x86_64:Linux:*:*)
951
 
        echo x86_64-unknown-linux-gnu
 
982
        echo x86_64-unknown-linux-${LIBC}
 
983
        exit ;;
 
984
    xtensa*:Linux:*:*)
 
985
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
952
986
        exit ;;
953
987
    i*86:Linux:*:*)
954
988
        # The BFD linker knows what the default object file format is, so
963
997
                                    p'`
964
998
        case "$ld_supported_targets" in
965
999
          elf32-i386)
966
 
                TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
 
1000
                TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}"
967
1001
                ;;
968
1002
          a.out-i386-linux)
969
 
                echo "${UNAME_MACHINE}-pc-linux-gnuaout"
 
1003
                echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout"
970
1004
                exit ;;
971
1005
          coff-i386)
972
 
                echo "${UNAME_MACHINE}-pc-linux-gnucoff"
 
1006
                echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff"
973
1007
                exit ;;
974
1008
          "")
975
1009
                # Either a pre-BFD a.out linker (linux-gnuoldld) or
976
1010
                # one that does not give us useful --help.
977
 
                echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
 
1011
                echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld"
978
1012
                exit ;;
979
1013
        esac
 
1014
        # This should get integrated into the C code below, but now we hack
 
1015
        if [ "$LIBC" != "gnu" ] ; then echo "$TENTATIVE" && exit 0 ; fi
980
1016
        # Determine whether the default compiler is a.out or elf
981
1017
        eval $set_cc_for_build
982
1018
        sed 's/^        //' << EOF >$dummy.c
1208
1244
    SX-6:SUPER-UX:*:*)
1209
1245
        echo sx6-nec-superux${UNAME_RELEASE}
1210
1246
        exit ;;
 
1247
    SX-7:SUPER-UX:*:*)
 
1248
        echo sx7-nec-superux${UNAME_RELEASE}
 
1249
        exit ;;
 
1250
    SX-8:SUPER-UX:*:*)
 
1251
        echo sx8-nec-superux${UNAME_RELEASE}
 
1252
        exit ;;
 
1253
    SX-8R:SUPER-UX:*:*)
 
1254
        echo sx8r-nec-superux${UNAME_RELEASE}
 
1255
        exit ;;
1211
1256
    Power*:Rhapsody:*:*)
1212
1257
        echo powerpc-apple-rhapsody${UNAME_RELEASE}
1213
1258
        exit ;;
1458
1503
the operating system you are using. It is advised that you
1459
1504
download the most up to date version of the config scripts from
1460
1505
 
1461
 
  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
 
1506
  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
1462
1507
and
1463
 
  http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
 
1508
  http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
1464
1509
 
1465
1510
If the version you run ($0) is already up to date, please
1466
1511
send the following data and any information you think might be