This is basically the same change that I last posted, but with the "don't remove configure on make clean" bits split into a separate patch as Christoph asked.