Motif comes installed, including all libraries and headers. I believe its version 2.2.x of the official Motif spec but dont quote me. If you are interested in motif development, Solaris is top notch.
Solaris doesn't come with MWM so you'll have to install lesstif for that. However CDE and Dtwm can be made to act like MWM if you wish.