[PATCH] configure: support builds using ccache
Thomas De Schampheleire
Sat Jun 21 15:21:41 2014
The configure script checks whether CC is executable by means of a check
'type $CC'. However, when using ccache, CC is normally set to "ccache gcc"
(using the appropriate paths). Such a compound string is not recognized by
type, however, and thus configure bails out.
This patch changes the check 'type $CC' with '$CC --version'. This will
effectively verify that $CC (the combination ccache + gcc) is executable
(assuming the compiler has a --version option, which should be the case for
all compilers).
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@xxxxxxxxx>
---
configure | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff -r 66c8bdc88858 -r beddaefe5eb0 configure
--- a/configure Sat Jun 21 16:54:30 2014 +0200
+++ b/configure Sat Jun 21 16:54:51 2014 +0200
@@ -272,8 +272,8 @@
fi
echo "Using compiler .. $CC"
-if ! type "$CC" >/dev/null 2>&1; then
- echo "$CC is not an executable"
+if ! $CC --version >/dev/null 2>&1; then
+ echo "$CC is not executable"
exit 1
fi
[ "$CC" != cc ] && echo "CC= $CC" >>$CONFIG_MK
Archive administrator: postmaster@marples.name