~john-koepi/ubuntu/trusty/memcached/default

« back to all changes in this revision

Viewing changes to config.guess

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2011-10-05 13:27:39 UTC
  • mfrom: (1.1.8 upstream) (3.3.4 sid)
  • Revision ID: james.westby@ubuntu.com-20111005132739-ntsnlj16fcze221i
Tags: 1.4.7-0.1ubuntu1
* Merge from debian unstable.  Remaining changes:
  - Run as 'memcache' user instead of nobody (LP #599461)
  - Depend on adduser for preinst/postrm
  - Create user in postinst

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, 2007, 2008
 
4
#   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
5
5
#   Free Software Foundation, Inc.
6
6
 
7
 
timestamp='2009-02-03'
 
7
timestamp='2009-06-10'
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
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
 
 
159
142
# Note: order is significant - the case branches are not exclusive.
160
143
 
161
144
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
187
170
            arm*|i386|m68k|ns32k|sh3*|sparc|vax)
188
171
                eval $set_cc_for_build
189
172
                if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
190
 
                        | grep __ELF__ >/dev/null
 
173
                        | grep -q __ELF__
191
174
                then
192
175
                    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
193
176
                    # Return netbsd for either.  FIX?
341
324
        case `/usr/bin/uname -p` in
342
325
            sparc) echo sparc-icl-nx7; exit ;;
343
326
        esac ;;
 
327
    s390x:SunOS:*:*)
 
328
        echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
 
329
        exit ;;
344
330
    sun4H:SunOS:5.*:*)
345
331
        echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
346
332
        exit ;;
670
656
            # => hppa64-hp-hpux11.23
671
657
 
672
658
            if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
673
 
                grep __LP64__ >/dev/null
 
659
                grep -q __LP64__
674
660
            then
675
661
                HP_ARCH="hppa2.0w"
676
662
            else
836
822
    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
837
823
        echo i${UNAME_MACHINE}-pc-mks
838
824
        exit ;;
 
825
    8664:Windows_NT:*)
 
826
        echo x86_64-pc-mks
 
827
        exit ;;
839
828
    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
840
829
        # How do we know it's Interix rather than the generic POSIX subsystem?
841
830
        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
870
859
        if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
871
860
            | grep -q __ARM_EABI__
872
861
        then
873
 
            echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 
862
            echo ${UNAME_MACHINE}-unknown-linux-gnu
874
863
        else
875
 
            echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
 
864
            echo ${UNAME_MACHINE}-unknown-linux-gnueabi
876
865
        fi
877
866
        exit ;;
878
867
    avr32*:Linux:*:*)
879
 
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 
868
        echo ${UNAME_MACHINE}-unknown-linux-gnu
880
869
        exit ;;
881
870
    cris:Linux:*:*)
882
 
        echo cris-axis-linux-${LIBC}
 
871
        echo cris-axis-linux-gnu
883
872
        exit ;;
884
873
    crisv32:Linux:*:*)
885
 
        echo crisv32-axis-linux-${LIBC}
 
874
        echo crisv32-axis-linux-gnu
886
875
        exit ;;
887
876
    frv:Linux:*:*)
888
 
        echo frv-unknown-linux-${LIBC}
 
877
        echo frv-unknown-linux-gnu
889
878
        exit ;;
890
879
    ia64:Linux:*:*)
891
 
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 
880
        echo ${UNAME_MACHINE}-unknown-linux-gnu
892
881
        exit ;;
893
882
    m32r*:Linux:*:*)
894
 
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 
883
        echo ${UNAME_MACHINE}-unknown-linux-gnu
895
884
        exit ;;
896
885
    m68*:Linux:*:*)
897
 
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 
886
        echo ${UNAME_MACHINE}-unknown-linux-gnu
898
887
        exit ;;
899
 
    mips:Linux:*:*)
900
 
        eval $set_cc_for_build
901
 
        sed 's/^        //' << EOF >$dummy.c
902
 
        #undef CPU
903
 
        #undef mips
904
 
        #undef mipsel
905
 
        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
906
 
        CPU=mipsel
907
 
        #else
908
 
        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
909
 
        CPU=mips
910
 
        #else
911
 
        CPU=
912
 
        #endif
913
 
        #endif
914
 
EOF
915
 
        eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
916
 
            /^CPU/{
917
 
                s: ::g
918
 
                p
919
 
            }'`"
920
 
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
921
 
        ;;
922
 
    mips64:Linux:*:*)
923
 
        eval $set_cc_for_build
924
 
        sed 's/^        //' << EOF >$dummy.c
925
 
        #undef CPU
926
 
        #undef mips64
927
 
        #undef mips64el
928
 
        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
929
 
        CPU=mips64el
930
 
        #else
931
 
        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
932
 
        CPU=mips64
933
 
        #else
934
 
        CPU=
935
 
        #endif
936
 
        #endif
937
 
EOF
938
 
        eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
939
 
            /^CPU/{
940
 
                s: ::g
941
 
                p
942
 
            }'`"
943
 
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
 
888
    mips:Linux:*:* | mips64:Linux:*:*)
 
889
        eval $set_cc_for_build
 
890
        sed 's/^        //' << EOF >$dummy.c
 
891
        #undef CPU
 
892
        #undef ${UNAME_MACHINE}
 
893
        #undef ${UNAME_MACHINE}el
 
894
        #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
 
895
        CPU=${UNAME_MACHINE}el
 
896
        #else
 
897
        #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
 
898
        CPU=${UNAME_MACHINE}
 
899
        #else
 
900
        CPU=
 
901
        #endif
 
902
        #endif
 
903
EOF
 
904
        eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
 
905
            /^CPU/{
 
906
                s: ::g
 
907
                p
 
908
            }'`"
 
909
        test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
944
910
        ;;
945
911
    or32:Linux:*:*)
946
 
        echo or32-unknown-linux-${LIBC}
 
912
        echo or32-unknown-linux-gnu
947
913
        exit ;;
948
914
    ppc:Linux:*:*)
949
 
        echo powerpc-unknown-linux-${LIBC}
 
915
        echo powerpc-unknown-linux-gnu
950
916
        exit ;;
951
917
    ppc64:Linux:*:*)
952
 
        echo powerpc64-unknown-linux-${LIBC}
 
918
        echo powerpc64-unknown-linux-gnu
953
919
        exit ;;
954
920
    alpha:Linux:*:*)
955
921
        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
961
927
          EV67)  UNAME_MACHINE=alphaev67 ;;
962
928
          EV68*) UNAME_MACHINE=alphaev68 ;;
963
929
        esac
964
 
        objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
965
 
        if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
966
 
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 
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}
967
933
        exit ;;
968
934
    padre:Linux:*:*)
969
935
        echo sparc-unknown-linux-gnu
971
937
    parisc:Linux:*:* | hppa:Linux:*:*)
972
938
        # Look for CPU level
973
939
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
974
 
          PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
975
 
          PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
976
 
          *)    echo hppa-unknown-linux-${LIBC} ;;
 
940
          PA7*) echo hppa1.1-unknown-linux-gnu ;;
 
941
          PA8*) echo hppa2.0-unknown-linux-gnu ;;
 
942
          *)    echo hppa-unknown-linux-gnu ;;
977
943
        esac
978
944
        exit ;;
979
945
    parisc64:Linux:*:* | hppa64:Linux:*:*)
980
 
        echo hppa64-unknown-linux-${LIBC}
 
946
        echo hppa64-unknown-linux-gnu
981
947
        exit ;;
982
948
    s390:Linux:*:* | s390x:Linux:*:*)
983
949
        echo ${UNAME_MACHINE}-ibm-linux
984
950
        exit ;;
985
951
    sh64*:Linux:*:*)
986
 
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 
952
        echo ${UNAME_MACHINE}-unknown-linux-gnu
987
953
        exit ;;
988
954
    sh*:Linux:*:*)
989
 
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 
955
        echo ${UNAME_MACHINE}-unknown-linux-gnu
990
956
        exit ;;
991
957
    sparc:Linux:*:* | sparc64:Linux:*:*)
992
 
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 
958
        echo ${UNAME_MACHINE}-unknown-linux-gnu
993
959
        exit ;;
994
960
    vax:Linux:*:*)
995
 
        echo ${UNAME_MACHINE}-dec-linux-${LIBC}
 
961
        echo ${UNAME_MACHINE}-dec-linux-gnu
996
962
        exit ;;
997
963
    x86_64:Linux:*:*)
998
 
        echo x86_64-unknown-linux-${LIBC}
 
964
        echo x86_64-unknown-linux-gnu
999
965
        exit ;;
1000
966
    xtensa*:Linux:*:*)
1001
 
        echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
 
967
        echo ${UNAME_MACHINE}-unknown-linux-gnu
1002
968
        exit ;;
1003
969
    i*86:Linux:*:*)
1004
970
        # The BFD linker knows what the default object file format is, so
1013
979
                                    p'`
1014
980
        case "$ld_supported_targets" in
1015
981
          elf32-i386)
1016
 
                TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}"
 
982
                TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
1017
983
                ;;
1018
 
          a.out-i386-linux)
1019
 
                echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout"
1020
 
                exit ;;
1021
 
          "")
1022
 
                # Either a pre-BFD a.out linker (linux-gnuoldld) or
1023
 
                # one that does not give us useful --help.
1024
 
                echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld"
1025
 
                exit ;;
1026
984
        esac
1027
 
        # This should get integrated into the C code below, but now we hack
1028
 
        if [ "$LIBC" != "gnu" ] ; then echo "$TENTATIVE" && exit 0 ; fi
1029
985
        # Determine whether the default compiler is a.out or elf
1030
986
        eval $set_cc_for_build
1031
987
        sed 's/^        //' << EOF >$dummy.c
1090
1046
    i*86:syllable:*:*)
1091
1047
        echo ${UNAME_MACHINE}-pc-syllable
1092
1048
        exit ;;
1093
 
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
 
1049
    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
1094
1050
        echo i386-unknown-lynxos${UNAME_RELEASE}
1095
1051
        exit ;;
1096
1052
    i*86:*DOS:*:*)
1134
1090
    pc:*:*:*)
1135
1091
        # Left here for compatibility:
1136
1092
        # uname -m prints for DJGPP always 'pc', but it prints nothing about
1137
 
        # the processor, so we play safe by assuming i386.
1138
 
        echo i386-pc-msdosdjgpp
 
1093
        # the processor, so we play safe by assuming i586.
 
1094
        # Note: whatever this is, it MUST be the same as what config.sub
 
1095
        # prints for the "djgpp" host, or else GDB configury will decide that
 
1096
        # this is a cross-build.
 
1097
        echo i586-pc-msdosdjgpp
1139
1098
        exit ;;
1140
1099
    Intel:Mach:3*:*)
1141
1100
        echo i386-pc-mach3
1195
1154
    rs6000:LynxOS:2.*:*)
1196
1155
        echo rs6000-unknown-lynxos${UNAME_RELEASE}
1197
1156
        exit ;;
1198
 
    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
 
1157
    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
1199
1158
        echo powerpc-unknown-lynxos${UNAME_RELEASE}
1200
1159
        exit ;;
1201
1160
    SM[BE]S:UNIX_SV:*:*)