I'm attaching patches that enable support for ccache and distcc in both
2.6 and 3.0, via --enable flags (defaults to off)
Please review and apply.
Kinkie
--- squid-2.6.PRE2/configure.in 2006-06-06 19:46:18.000000000 +0200
+++ squid-2.6.PRE2-new/configure.in 2006-06-09 23:10:44.000000000 +0200
@@ -28,6 +28,47 @@
AM_PROG_CC_C_O
AC_CANONICAL_HOST
+AC_PATH_PROG(CCACHE,ccache,none)
+AC_ARG_ENABLE(ccache,
+[ --enable-ccache Enable and use ccache - useful for developers],
+[
+ case "$enableval" in
+ 'yes')
+ if test "$ac_cv_path_CCACHE" = "none"; then
+ echo "ccache not found. Falling back to default CC"
+ else
+ CC="$ac_cv_path_CCACHE $CC"
+ AC_MSG_NOTICE(enabling ccache)
+ cv_squid_using_ccache="yes"
+ fi
+ ;;
+ *)
+ esac
+])
+
+AC_PATH_PROG(DISTCC,distcc,none)
+AC_ARG_ENABLE(distcc,
+[ --enable-distcc Enable and use distcc],
+[
+ case "$enableval" in
+ 'yes')
+ if test "$ac_cv_path_DISTCC" = "none"; then
+ echo "distcc not found. Falling back to default CC"
+ else
+ if test "$cv_squid_using_ccache" = "yes"; then
+ CC="$ac_cv_path_DISTCC $CC"
+ AC_MSG_NOTICE(enabling joint ccache+distcc usage)
+ else
+ CCACHE_PREFIX="$ac_cv_path_DISTCC"
+ AC_MSG_NOTICE(enabling distcc)
+ fi
+ fi
+ ;;
+ *)
+ esac
+])
+unset cv_squid_using_ccache
+
CRYPTLIB=''
REGEXLIB='' # -lregex
diff -ur squid-3.0-PRE3-20060609/configure.in squid-3.0-PRE3-20060609-new/configure.in
--- squid-3.0-PRE3-20060609/configure.in 2006-06-09 02:10:54.000000000 +0200
+++ squid-3.0-PRE3-20060609-new/configure.in 2006-06-12 23:50:17.000000000 +0200
@@ -36,6 +36,48 @@
AC_LTDL_DLLIB
AC_PROG_RANLIB
+AC_PATH_PROG(CCACHE,ccache,none)
+AC_ARG_ENABLE(ccache,
+[ --enable-ccache Enable and use ccache - useful for developers],
+[
+ case "$enableval" in
+ 'yes')
+ if test "$ac_cv_path_CCACHE" = "none"; then
+ echo "ccache not found. Falling back to default CC"
+ else
+ CC="$ac_cv_path_CCACHE $CC"
+ CXX="$ac_cv_path_CCACHE $CXX"
+ AC_MSG_NOTICE(enabling ccache)
+ cv_squid_using_ccache="yes"
+ fi
+ ;;
+ *)
+ esac
+])
+
+AC_PATH_PROG(DISTCC,distcc,none)
+AC_ARG_ENABLE(distcc,
+[ --enable-distcc Enable and use distcc],
+[
+ case "$enableval" in
+ 'yes')
+ if test "$ac_cv_path_DISTCC" = "none"; then
+ echo "distcc not found. Falling back to default CC"
+ else
+ if test "$cv_squid_using_ccache" = "yes"; then
+ CC="$ac_cv_path_DISTCC $CXX"
+ AC_MSG_NOTICE(enabling joint ccache+distcc usage)
+ else
+ CCACHE_PREFIX="$ac_cv_path_DISTCC"
+ AC_MSG_NOTICE(enabling distcc)
+ fi
+ fi
+ ;;
+ *)
+ esac
+])
+unset cv_squid_using_ccache
+
CRYPTLIB=''
REGEXLIB='' # -lregex