The Leica M9 can recognize lenses and apply in-camera adjustments to the photo. For this to work, you need lenses with the proper encoding. This encoding is a set of black and white 'dots' on the lens that the camera can detect (basically a binary system). Older lenses don't have this system, so you can set the lens type manually in the camera menu.
If you're using non-Leica lenses (e.g. Zeiss), you can set the lens detection by hand in the menu system. Unfortunately, Leica only implemented a list with Leica lenses. No third party lenses are available, so you need to be creative.
I have a Zeis 28mm f/2.8, and this lens can be 'mapped' to a Leica 28mm f/2.8 (type 11809). The impact of this is enormous as you can see in the following example. The first photo has been taken on the automatic lens detection setting. The second on the Manual selection (the Leica 28mm f/2.8).
The difference is enormous. The first image (without the lens correction) has significant vignetting in the corners (and perhaps some blueish color cast), while this has been removed with the appropriate (manual) lens selection in the camera.