Hi, On Fri, Jun 03, 2005 at 02:34:35PM +0200, Ralf Corsepius wrote: > > The variable itself has to have higher priority than its cache shadow. > This is how they are supposed to work. Environment variables are > supposed to override the cache. but in case of programs.m4 this is not the case. Try it: $ configure -C ... $ ./configure -C AWK=newawk ... checking for gawk... (cached) gawk (I know this is not proper use of cache, and that configure would complain if AWK was properly declared as precious, but that's not my point now.) This shows that in case of AC_*PROG* macros, the cache has higher priority than the variable itself. This is why I said: > > Currently, AC_PROG_AWK is something like > > > > AC_CACHE_VAL([ac_cv_prog_AWK], [if test "x$AWK" = x; then ... ; fi]) > > > > but it should be: > > > > if test "x$AWK" = x; then > > AC_CACHE_VAL([ac_cv_prog_AWK], [...]) > > fi > > A plan: > > The current caching scheme in programs.m4 has serious problems and has > > to be removed. That will significantly improve correctness. > Which? I don't see them. The problem described above is one. Another two are the examples I posted in http://lists.gnu.org/archive/html/autoconf/2005-06/msg00003.html the behaviour is counterintuitive. > Conversely, this scheme is almost as old as autoconf (I don't recall > when they were introduces autoconf-2.8 or something) [...] Was the bug I presented above introduced at the beginning? Or did it happen later? Please believe me, I don't want to attack the caching mechanism in general. I just want to remove it from programs.m4, because it doesn't work well there. > Either autoconf should perform a clear cut, that is abandon caches > entirely, No, I don't want that. > which means autoconf will be totally incompatible to any > former version of autoconf _incompatible_ ? If I remove caching from AC_CHECK_PROG and AC_CHECK_TOOL, what _incompatibility_ would it cause? Would it break some documented behaviour? Have a nice day, Stepan _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf