1From ab0eec78382bd00ce533aec2c84fd50c1733033d Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 5 Jan 2013 19:42:51 -0800
4
5---
6 configure | 32 ++++++++++++++++++--------------
7 1 file changed, 18 insertions(+), 14 deletions(-)
8
9diff --git a/configure b/configure
10index 76c2812..78ce2ff 100755
11--- a/configure
12+++ b/configure
13@@ -535,14 +535,18 @@ else
14 	GZIP_SUFFIX=".gz"
15 fi
16
17-printf "Finding suitable compiler........"
18-CC=`pathsearch "${CC:-cc}"`
19-if test -z "$CC" -o ! -x "$CC"; then
20-	CC=`pathsearch "${CC:-gcc}"`
21+if test -z "$CC"; then
22+	printf "Finding suitable compiler........"
23+	CC=`pathsearch "${CC:-cc}"`
24+	if test -z "$CC" -o ! -x "$CC"; then
25+		CC=`pathsearch "${CC:-gcc}"`
26+	fi
27 fi
28 assert "$CC" "not found"
29
30-cat << EOF > .1.c
31+if test -z "$COMPILER"; then
32+
33+	cat << EOF > .1.c
34 #include <stdio.h>
35 int main(void) {
36 #if defined(_WIN32)
37@@ -569,16 +573,16 @@ int main(void) {
38 #endif
39 }
40 EOF
41+	$CC -o .1 .1.c
42+	COMPILER=`./.1`
43+	r=$?
44+	rm -f .1.c .1
45
46-$CC -o .1 .1.c
47-COMPILER=`./.1`
48-r=$?
49-rm -f .1.c .1
50-
51-if test "$r" -ne 0; then
52-	assert "" "update compiler"
53-else
54-	echo "success [$CC]"
55+	if test "$r" -ne 0; then
56+		assert "" "update compiler"
57+	else
58+		echo "success [$CC]"
59+	fi
60 fi
61
62 if test "$COMPILER" = "suncc"; then
63