1 Patch courtesy gentoo-portage/sys-devel/gnuconfig/files/automake-1.8.5-config-guess-uclibc.patch.
3 updated to 20050516 by Marcin 'Hrw' Juszkiewicz (by hand)
5 Index: config/config.guess
6 ===================================================================
7 --- config.guess.original 2005-05-16 13:43:19 +0200
8 +++ config.guess 2005-05-16 13:45:26 +0200
10 UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
11 UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
13 +# Detect uclibc systems.
16 +if [ -f /usr/include/bits/uClibc_config.h ]
19 + if [ -n `grep "#define __UCLIBC_CONFIG_VERSION__" /usr/include/bits/uClibc_config.h` ]
21 + UCLIBC_SUBVER=`sed -n "/#define __UCLIBC_CONFIG_VERSION__ /s///p" /usr/include/bits/uClibc_config.h`
22 + LIBC=$LIBC$UCLIBC_SUBVER
26 # Note: order is significant - the case branches are not exclusive.
28 case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
30 echo ${UNAME_MACHINE}-pc-minix
33 - echo ${UNAME_MACHINE}-unknown-linux-gnu
34 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
37 echo cris-axis-linux-gnu
39 echo crisv32-axis-linux-gnu
42 - echo frv-unknown-linux-gnu
43 + echo frv-unknown-linux-${LIBC}
46 - echo ${UNAME_MACHINE}-unknown-linux-gnu
47 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
50 - echo ${UNAME_MACHINE}-unknown-linux-gnu
51 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
54 - echo ${UNAME_MACHINE}-unknown-linux-gnu
55 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
58 eval $set_cc_for_build
62 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
63 - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
64 + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
67 eval $set_cc_for_build
71 eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
72 - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
73 + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
76 - echo powerpc-unknown-linux-gnu
77 + echo powerpc-unknown-linux-${LIBC}
80 - echo powerpc64-unknown-linux-gnu
81 + echo powerpc64-unknown-linux-${LIBC}
84 case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
86 EV68*) UNAME_MACHINE=alphaev68 ;;
88 objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
89 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
90 - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
91 + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
92 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
94 parisc:Linux:*:* | hppa:Linux:*:*)
96 case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
97 - PA7*) echo hppa1.1-unknown-linux-gnu ;;
98 - PA8*) echo hppa2.0-unknown-linux-gnu ;;
99 - *) echo hppa-unknown-linux-gnu ;;
100 + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;;
101 + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;;
102 + *) echo hppa-unknown-linux-${LIBC} ;;
105 parisc64:Linux:*:* | hppa64:Linux:*:*)
106 - echo hppa64-unknown-linux-gnu
107 + echo hppa64-unknown-linux-${LIBC}
109 s390:Linux:*:* | s390x:Linux:*:*)
110 echo ${UNAME_MACHINE}-ibm-linux
113 - echo ${UNAME_MACHINE}-unknown-linux-gnu
114 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
117 - echo ${UNAME_MACHINE}-unknown-linux-gnu
118 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
120 sparc:Linux:*:* | sparc64:Linux:*:*)
121 - echo ${UNAME_MACHINE}-unknown-linux-gnu
122 + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
125 - echo x86_64-unknown-linux-gnu
126 + echo x86_64-unknown-linux-${LIBC}
129 # The BFD linker knows what the default object file format is, so
130 @@ -964,20 +977,21 @@
132 case "$ld_supported_targets" in
134 - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
135 + TENTATIVE="${UNAME_MACHINE}-pc-linux-${LIBC}"
138 - echo "${UNAME_MACHINE}-pc-linux-gnuaout"
139 + echo "${UNAME_MACHINE}-pc-linux-${LIBC}aout"
142 - echo "${UNAME_MACHINE}-pc-linux-gnucoff"
143 + echo "${UNAME_MACHINE}-pc-linux-${LIBC}coff"
146 # Either a pre-BFD a.out linker (linux-gnuoldld) or
147 # one that does not give us useful --help.
148 - echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
149 + echo "${UNAME_MACHINE}-pc-linux-${LIBC}oldld"
152 + if [ $LIBC != "gnu" -o $LIBC != "gnulibc1" ];then echo "$TENTATIVE" && exit; fi
153 # Determine whether the default compiler is a.out or elf
154 eval $set_cc_for_build
155 sed 's/^ //' << EOF >$dummy.c