I'd want to earn a a hell of a lot before dropping £40k on a motor, infact i cant really imagine ever dropping that much on a car when £20k (or even £10k, my car which i would consider very nice, and gets loads of compliments and comments about being OTT was only £8k!) buys so much these days, and i dont put my car as a mega high priority in terms of spending. As it stands i keep my car costs to an amount where the car doesnt cost any noticable chunk of income to run.
In terms of a figure, i'd want to be taking home at least £10k or so before i could ever justify it. Much more than 4 months or so salary on a car i dont think i could imagine.