So, you need to
<file name='~/bin/cg++' status="untested"> #! /bin/sh ccache g++ "$@" </file>
I have an autoconf macro detecting ccache, so I could indeed generate such a file on the fly. However, as a maintainer, I find it easier to request developers to have up-to-date autotools rather than keeping another 'permanent temporary hack' around. Is there a reason not to 'fix' the libtool invocation in automake ?