For detailed information on how to compile Mahogany yourself and how to change it or get involved in its development, please refer to the Hackers' Guide, included either in the online docs or on the Mahogany Web page.
Some quick notes about common compilation problems can be found in the FAQ, in section 5.1.3.