Most packages that are required for development (Like GCC) should already be installed on your box. You will require these packages in addition to GCC, make and the usual build tools. Beside those, OpenTTD requires the SDL development libraries to be installed. Optionally, but extremely recommended is install zlib development files, which compresses savegames (not having this doesn't just make your games bigger, but also makes you unable to load compressed savegames or join network games with compression, ie all network games). Lastly, OpenTTD can use the libpng development files to produces screenshots in PNG instead of BMP.
Furthermore, if you want to be as up to date as you can be, you should install the subversion client to access the latest code in our subversion repository.
The most challeging part is getting the SDL libraries for solaris. After this just compile like on linux