I would guess that you need a wiring diagram for each. Then you probably need to build new connectors wired to match each other.
This is one of the issues I was referring too when I mentioned it wasn't just going to bolt up. How much age difference between the chassis and the M50? Getting the engine wired in will be a pain, but it is do-able. Good Luck
Current ride... '13 GTI Wolfsburg
BMW's from my past...
'92 535i/5 '89 325ix/5
'98 750iL '86 325(e)/5
'95 740iL '84 318i/5