~ubuntu-branches/ubuntu/edgy/xfce-mcs-plugins/edgy

« back to all changes in this revision

Viewing changes to config.guess

  • Committer: Bazaar Package Importer
  • Author(s): Jani Monoses
  • Date: 2006-02-21 12:44:00 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20060221124400-njwotsoltds9b6ga
Tags: 4.3.0svn+r19979-0ubuntu1
Upstream svn snapshot

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4
4
#   2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
5
5
 
6
 
timestamp='2005-08-03'
 
6
timestamp='2005-12-23'
7
7
 
8
8
# This file is free software; you can redistribute it and/or modify it
9
9
# under the terms of the GNU General Public License as published by
138
138
UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
139
139
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
140
140
 
 
141
if [ "${UNAME_SYSTEM}" = "Linux" ] ; then
 
142
        eval $set_cc_for_build
 
143
        cat << EOF > $dummy.c
 
144
        #include <features.h>
 
145
        #ifdef __UCLIBC__
 
146
        # ifdef __UCLIBC_CONFIG_VERSION__
 
147
        LIBC=uclibc __UCLIBC_CONFIG_VERSION__
 
148
        # else
 
149
        LIBC=uclibc
 
150
        # endif
 
151
        #else
 
152
        LIBC=gnu
 
153
        #endif
 
154
EOF
 
155
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep LIBC= | sed -e 's: ::g'`
 
156
fi
 
157
 
141
158
# Note: order is significant - the case branches are not exclusive.
142
159
 
143
160
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
764
781
        echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
765
782
        exit ;;
766
783
    *:FreeBSD:*:*)
767
 
        echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
 
784
        case ${UNAME_MACHINE} in
 
785
            pc98)
 
786
                echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
 
787
            *)
 
788
                echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
 
789
        esac
768
790
        exit ;;
769
791
    i*:CYGWIN*:*)
770
792
        echo ${UNAME_MACHINE}-pc-cygwin
779
801
    i*:PW*:*)
780
802
        echo ${UNAME_MACHINE}-pc-pw32
781
803
        exit ;;
782
 
    x86:Interix*:[34]*)
 
804
    x86:Interix*:[345]*)
783
805
        echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
784
806
        exit ;;
785
807
    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
815
837
        echo ${UNAME_MACHINE}-pc-minix
816
838
        exit ;;
817
839
    arm*:Linux:*:*)
818
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
840
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
819
841
        exit ;;
820
842
    cris:Linux:*:*)
821
 
        echo cris-axis-linux-gnu
 
843
        echo cris-axis-linux-${LIBC}
822
844
        exit ;;
823
845
    crisv32:Linux:*:*)
824
 
        echo crisv32-axis-linux-gnu
 
846
        echo crisv32-axis-linux-${LIBC}
825
847
        exit ;;
826
848
    frv:Linux:*:*)
827
 
        echo frv-unknown-linux-gnu
 
849
        echo frv-unknown-linux-${LIBC}
828
850
        exit ;;
829
851
    ia64:Linux:*:*)
830
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
852
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
831
853
        exit ;;
832
854
    m32r*:Linux:*:*)
833
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
855
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
834
856
        exit ;;
835
857
    m68*:Linux:*:*)
836
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
858
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
837
859
        exit ;;
838
860
    mips:Linux:*:*)
839
861
        eval $set_cc_for_build
851
873
        #endif
852
874
        #endif
853
875
EOF
854
 
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
855
 
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
 
876
        eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
 
877
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
856
878
        ;;
857
879
    mips64:Linux:*:*)
858
880
        eval $set_cc_for_build
870
892
        #endif
871
893
        #endif
872
894
EOF
873
 
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
874
 
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
 
895
        eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^CPU/{s: ::g;p;}'`"
 
896
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
875
897
        ;;
876
898
    or32:Linux:*:*)
877
 
        echo or32-unknown-linux-gnu
 
899
        echo or32-unknown-linux-${LIBC}
878
900
        exit ;;
879
901
    ppc:Linux:*:*)
880
 
        echo powerpc-unknown-linux-gnu
 
902
        echo powerpc-unknown-linux-${LIBC}
881
903
        exit ;;
882
904
    ppc64:Linux:*:*)
883
 
        echo powerpc64-unknown-linux-gnu
 
905
        echo powerpc64-unknown-linux-${LIBC}
884
906
        exit ;;
885
907
    alpha:Linux:*:*)
886
908
        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
893
915
          EV68*) UNAME_MACHINE=alphaev68 ;;
894
916
        esac
895
917
        objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
896
 
        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
897
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
 
918
        if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
 
919
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
898
920
        exit ;;
899
921
    parisc:Linux:*:* | hppa:Linux:*:*)
900
922
        # Look for CPU level
901
923
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
902
 
          PA7*) echo hppa1.1-unknown-linux-gnu ;;
903
 
          PA8*) echo hppa2.0-unknown-linux-gnu ;;
904
 
          *)    echo hppa-unknown-linux-gnu ;;
 
924
          PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
 
925
          PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
 
926
          *)    echo hppa-unknown-linux-${LIBC} ;;
905
927
        esac
906
928
        exit ;;
907
929
    parisc64:Linux:*:* | hppa64:Linux:*:*)
908
 
        echo hppa64-unknown-linux-gnu
 
930
        echo hppa64-unknown-linux-${LIBC}
909
931
        exit ;;
910
932
    s390:Linux:*:* | s390x:Linux:*:*)
911
933
        echo ${UNAME_MACHINE}-ibm-linux
912
934
        exit ;;
913
935
    sh64*:Linux:*:*)
914
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
936
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
915
937
        exit ;;
916
938
    sh*:Linux:*:*)
917
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
939
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
918
940
        exit ;;
919
941
    sparc:Linux:*:* | sparc64:Linux:*:*)
920
 
        echo ${UNAME_MACHINE}-unknown-linux-gnu
 
942
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 
943
        exit ;;
 
944
    vax:Linux:*:*)
 
945
        echo ${UNAME_MACHINE}-dec-linux-${LIBC}
921
946
        exit ;;
922
947
    x86_64:Linux:*:*)
923
 
        echo x86_64-unknown-linux-gnu
 
948
        echo x86_64-unknown-linux-${LIBC}
924
949
        exit ;;
925
950
    i*86:Linux:*:*)
926
951
        # The BFD linker knows what the default object file format is, so
935
960
                                    p'`
936
961
        case "$ld_supported_targets" in
937
962
          elf32-i386)
938
 
                TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
 
963
                TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}"
939
964
                ;;
940
965
          a.out-i386-linux)
941
 
                echo "${UNAME_MACHINE}-pc-linux-gnuaout"
 
966
                echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout"
942
967
                exit ;;
943
968
          coff-i386)
944
 
                echo "${UNAME_MACHINE}-pc-linux-gnucoff"
 
969
                echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff"
945
970
                exit ;;
946
971
          "")
947
972
                # Either a pre-BFD a.out linker (linux-gnuoldld) or
948
973
                # one that does not give us useful --help.
949
 
                echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
 
974
                echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld"
950
975
                exit ;;
951
976
        esac
 
977
        # This should get integrated into the C code below, but now we hack
 
978
        if [ "$LIBC" != "gnu" ] ; then echo "$TENTATIVE" && exit 0 ; fi
952
979
        # Determine whether the default compiler is a.out or elf
953
980
        eval $set_cc_for_build
954
981
        sed 's/^        //' << EOF >$dummy.c
964
991
        LIBC=gnulibc1
965
992
        # endif
966
993
        #else
967
 
        #ifdef __INTEL_COMPILER
 
994
        #if defined(__INTEL_COMPILER) || defined(__PGI)
968
995
        LIBC=gnu
969
996
        #else
970
997
        LIBC=gnuaout
974
1001
        LIBC=dietlibc
975
1002
        #endif
976
1003
EOF
977
 
        eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
 
1004
        eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s: ::g;p;}'`"
978
1005
        test x"${LIBC}" != x && {
979
1006
                echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
980
1007
                exit
1185
1212
    *:Darwin:*:*)
1186
1213
        UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
1187
1214
        case $UNAME_PROCESSOR in
1188
 
            *86) UNAME_PROCESSOR=i686 ;;
1189
1215
            unknown) UNAME_PROCESSOR=powerpc ;;
1190
1216
        esac
1191
1217
        echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
1264
1290
    i*86:skyos:*:*)
1265
1291
        echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
1266
1292
        exit ;;
 
1293
    i*86:rdos:*:*)
 
1294
        echo ${UNAME_MACHINE}-pc-rdos
 
1295
        exit ;;
1267
1296
esac
1268
1297
 
1269
1298
#echo '(No uname command or uname output not recognized.)' 1>&2