Don't the M42 and M40 have the same bolt pattern on oilpans?
This is very easy swap to do. Will drop right in. 518I model was sold only in quite few european countries like Belgium, Finland etc.First E34 i test drive back in the late '80's was M40 518I. I was just terrible .