Just out of curiosity, I asked a local high end BMW tuning shop about installing a M5 engine in an E46 M3.
Apparently the cost of the engine is not the biggest expense. The real cost is the labor it would take to get the engine set up properly with the car. He estimated at least 30 K (Canadian) of labor to get it set up right. He's seen some half ass*d engine transplants in BMW that were done by inexperienced mechanics, and noted that the car just won't run right, and that just IMO contradicts everything a BMW is. Your likely better off getting an properly done up E30 engine that is made for an E30 that would save you all the headaches that are inevitable when your attempting to transplant an E46 engine into a E30.
Back 20 years ago, car engines were not interacting with the car as much as modern engines are now, especially a BMW. Now, the engine is more a computer, interacting with more sensors than you can shake a stick at. Its all that interaction that have to be taken into consideration that have to be set up right, to makes a BMW a BMW.
That's the reason why I was considering a less technologically advanced car like a Corvette Z06 when I was considering a car a year ago. BMW cars are much more difficult, and expensive to mod than most cars because of that.
