I went thru the same decision sorta about 2 years ago, wanted a nice ride under $40k. At the time, I was looking at a BMW 323, Audi A4, used M3, Lexus IS300, and the S4. Crossed the M3 off the list cuz I wanted a new car (never driven a new car before in my life, and I wanted the first car I ever bought with my own money to be new plus I don't particularly like the boxy look of the E36 M3 ), crossed the S4 off the list cuz it was too expensive, crossed the IS300 off the list cuz it only came in automatic at the time, and finally crossed the 323 off the list cuz I could get so much more with the A4 for less money.
While I love driving my A4, if I had to do it over again I think I'd go with the M3. The 1.8t engine (even chipped and with an exhaust) just doesn't have the oomph of the M3's inline 6, I'd have to spend $3k+ on a new turbo that get that oomph. So out of your list, I'd go for an S4 first and foremost. I love AWD and the A4/S4's sleek style. Then mebbe a used M3, and then the new A4 3.0 (maybe higher on the list since I haven't driven the 220hp 3.0 engine).