On Wed, 2006-08-16 at 01:36 +0200, Kinkie wrote:
> Hi all,
> this is a second attempt at getting autoconf/automake to understand
> our desire to get builds faster, and this attempt works for me.
>
> I'm attaching a patch for 2.6S2, please check it out. Forward-porting to
> 3.0 should be trivial, I'll commit to that as soon as I get feedback on
> this one.
Follow-up to myself, and brown-paper-bag. I had missed some quotes. It
worked somehow, just because the bug hit c++ only.
New version attached and inline.
Kinkie
--- configure.in.orig 2006-08-16 02:57:18.000000000 +0200
+++ configure.in 2006-08-16 02:57:45.000000000 +0200
@@ -27,6 +27,54 @@
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
+ AC_MSG_NOTICE(ccache not found. Falling back to default CC)
+ else
+ CC="$ac_cv_path_CCACHE $CC"
+ GCC="$ac_cv_path_CCACHE $GCC"
+ CXX="$ac_cv_path_CCACHE $CXX"
+ GXX="$ac_cv_path_CCACHE $GXX"
+ 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
+ AC_MSG_NOTICE(distcc not found. Falling back to default CC)
+ else
+ if test "$cv_squid_using_ccache" = "yes"; then
+ CCACHE_PREFIX="$ac_cv_path_DISTCC"
+ AC_MSG_NOTICE(enabling joint ccache+distcc usage)
+ unset ac_cv_prog_ac_ct_CC ac_ct_CC ac_cv_prog_CC
+ unset ac_cv_c_compiler_gnu
+ else
+ CC="$ac_cv_path_DISTCC $CC"
+ GCC="$ac_cv_path_DISTCC $GCC"
+ CXX="$ac_cv_path_DISTCC $CXX"
+ GXX="$ac_cv_path_DISTCC $GXX"
+ AC_MSG_NOTICE(enabling distcc)
+ fi
+ fi
+ ;;
+ *)
+ esac
+])
+unset cv_squid_using_ccache
CRYPTLIB=''
REGEXLIB='' # -lregex
This archive was generated by hypermail pre-2.1.9 : Fri Sep 01 2006 - 12:00:03 MDT