rendered paste bodyIndex: SConstruct
===================================================================
RCS file: /cvsroot/linuxdcpp/linuxdcpp/SConstruct,v
retrieving revision 1.14
diff -u -r1.14 SConstruct
--- SConstruct 23 Feb 2006 10:02:58 -0000 1.14
+++ SConstruct 8 May 2006 08:10:31 -0000
@@ -82,7 +82,13 @@
print 'Compiler version check failed. g++ 3.4 or later is needed'
Exit(1)
-conf.env.Replace(CXX = cxx)
+# Add support for compiler caches to speed-up compilation.
+if os.popen('ccache').read():
+ conf.env.Replace(CXX = 'ccache ' + cxx)
+elif os.popen('distcc').read():
+ conf.env.Replace(CXX = 'distcc ' + cxx)
+else:
+ conf.env.Replace(CXX = cxx);
if not conf.CheckPKGConfig():
print 'pkg-config not found.'