2000-11-10 Ben Elliston <bje@redhat.com>

* config.guess: Search for a working C compiler if CC_FOR_BUILD is
	not specified. From Kevin Ryde <user42@zip.com.au>.
This commit is contained in:
Ben Elliston 2000-11-10 12:05:37 +00:00
parent a4a9fef5d6
commit 69999aff27
2 changed files with 21 additions and 5 deletions

View File

@ -1,3 +1,8 @@
2000-11-10 Ben Elliston <bje@redhat.com>
* config.guess: Search for a working C compiler if CC_FOR_BUILD is
not specified. From Kevin Ryde <user42@zip.com.au>.
2000-11-08 Ben Elliston <bje@redhat.com>
* config.guess: Detect sparc-unknown-linux-gnu. Reported by Peter

21
config.guess vendored
View File

@ -3,7 +3,7 @@
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
# Free Software Foundation, Inc.
version='2000-11-08'
version='2000-11-10'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@ -78,6 +78,10 @@ if test $# != 0; then
exit 1
fi
dummy=dummy-$$
trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
# Use $HOST_CC if defined. $CC may point to a cross-compiler
if test x"$CC_FOR_BUILD" = x; then
if test x"$HOST_CC" != x; then
@ -86,7 +90,17 @@ if test x"$CC_FOR_BUILD" = x; then
if test x"$CC" != x; then
CC_FOR_BUILD="$CC"
else
CC_FOR_BUILD=cc
echo 'int dummy(){}' >$dummy.c
for c in cc c89 gcc; do
($c $dummy.c -c) >/dev/null 2>&1
if test $? = 0; then
CC_FOR_BUILD="$c"; break
fi
done
rm -f $dummy.c $dummy.o
if test x"$CC_FOR_BUILD" = x; then
CC_FOR_BUILD=no_compiler_found
fi
fi
fi
fi
@ -103,9 +117,6 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
dummy=dummy-$$
trap 'rm -f $dummy.c $dummy.o $dummy; exit 1' 1 2 15
# Note: order is significant - the case branches are not exclusive.
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in