When ac_cv_prog_AR is preset or cached, configure cannot find AR. The test 'if test -z "$ac_ct_AR"' will always fail, because the code that sets ac_ct_AR gets completely by-passed.
Created attachment 5972 [details]
Patch to fix the error 'cannot find ar'
Created attachment 5973 [details]
Corrected patch to fix 'cannot find ar' error
Attached the wrong version of the patch. This is the correct one.
Your patch changes the autogenerated part of AC_CHECK_TOOL, so instead, I fixed the test three rows down by testing on $AR instead of $ac_ct_AR:
Does this work for you?
I don't see why it wouldn't. I was just trying to get past the error message without screwing anything else up in configure. I know just enough about the configure file to be dangerous. I'll test it tomorrow, and let you know if it works.
OK, I tested it, and it works fine.
Included in ccache version 3.1.1.