[uClibc] Re: [patch] Inform config.guess about the existence of uclibc.

Manuel Novoa III mjn3 at codepoet.org
Sun Jan 11 05:37:02 UTC 2004


Hello Rob,

On Fri, Jan 09, 2004 at 07:40:50PM -0600, Rob Landley wrote:
> --- config.guess.bak	2004-01-09 08:14:40.000000000 -0600
> +++ config.guess	2004-01-09 19:31:15.914199808 -0600
> @@ -135,6 +135,30 @@
>  UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
>  UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
>  
> +# Detect uclibc systems.
> +
> +LIBC="gnu"
> +if [ -f /usr/include/bits/uClibc_config.h ]
> +then
> +	LIBC="uclibc"
> +	UCLIBC_MAJOR=`sed -n "/#define __UCLIBC_MAJOR__ /s///p" usr/include/bits/uClibc_config.h`
> +	UCLIBC_MINOR=`sed -n "/#define __UCLIBC_MINOR__ /s///p" usr/include/bits/uClibc_config.h`
> +	UCLIBC_SUBLEVEL=`sed -n "/#define __UCLIBC_SUBLEVEL__ /s///p" usr/include/bits/uClibc_config.h`
> +	if [ $UCLIBC_MAJOR = "0" ]
> +	then
> +		UCLIBC_MAJOR="$UCLIBC_MAJOR.$UCLIBC_MINOR.$UCLIBC_SUBLEVEL"
> +	fi
> +	if [[ -z `grep "#define __UCLIBC_HAS_THREADS__" usr/include/bits/uClibc_config.h` ]]
> +	then
> +		UCLIBC_MAJOR="$UCLIBC_MAJOR"t
> +	fi
> +	if [[ -z `grep "#define __UCLIBC_HAS_LOCALE__" usr/include/bits/uClibc_config.h` ]]
> +	then
> +		UCLIBC_MAJOR="$UCLIBC_MAJOR"i
> +	fi
> +	LIBC=$LIBC$UCLIBC_MAJOR
> +fi

I like the idea of different names.  But I think it would be better
for us to do all the processing in uClibc_config.h itself and provide
a single identifier for config.guess to check.  That way, we isolate
config.guess from any future uClibc changes that we might wish to flag.

Manuel



More information about the uClibc mailing list