summaryrefslogtreecommitdiff
path: root/BUILD
diff options
context:
space:
mode:
authormonty@narttu.mysql.fi <>2003-06-04 19:21:51 +0300
committermonty@narttu.mysql.fi <>2003-06-04 19:21:51 +0300
commit40109c574ac5672a44aa963bbd4c239d1c067deb (patch)
tree6b8e47374bf313429416a26678bc409946f34772 /BUILD
parent23145cfed72954c29f5a47e82af22898164be4b0 (diff)
parent6217b578b9b9a6f65b6891b888be357d3148f4d0 (diff)
downloadmariadb-git-40109c574ac5672a44aa963bbd4c239d1c067deb.tar.gz
Merge with 4.0.13
Diffstat (limited to 'BUILD')
-rw-r--r--BUILD/SETUP.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh
index 4a19c490e5d..4d41f514704 100644
--- a/BUILD/SETUP.sh
+++ b/BUILD/SETUP.sh
@@ -71,6 +71,22 @@ else
make=make
fi
-if test -z $CXX ; then
+if test -z "$CXX" ; then
CXX=gcc
fi
+
+# If ccache (a compiler cache which reduces build time)
+# (http://samba.org/ccache) is installed, use it.
+# We use 'grep' and hope 'grep' will work as expected
+# (returns 0 if finds lines)
+if ccache -V > /dev/null 2>&1
+then
+ if ! (echo "$CC" | grep "ccache" > /dev/null)
+ then
+ CC="ccache $CC"
+ fi
+ if ! (echo "$CXX" | grep "ccache" > /dev/null)
+ then
+ CXX="ccache $CXX"
+ fi
+fi