Getrag 240 came in several flavors, 1 for the M10 320i and early 318i's. Later they used a 240 with a different front housing for the E30 318is. The transmission is an overdrive unit .8:1 in 5th.
The transmission should bolt up to the E36 M42 motor but I think it will slow the car down because IIR the E36 has a 1.1 5th gear. I would expect the diff ratio in a E36 is ~ low to mid 3.x:1. I think the E36 used a ZF trans so the length and mounting may be different, you may have drive shaft issues.
Warren
88 325iX
91 318is
95 525iT