New option to disable icon cache generation and small autofoo fixes

Now make distcheck passes.