Hi -
1. "Google xlib source" should take you somewhere near here:
http://www.x.org/
2. Familiarize yourself a bit (read some of the FAQs, etc)
3. Download the source and see how far you get.
If stuff is missing, then the initial "configure" part of the build should tell you. Even better, the "readme" files that come with the source distribution should also list dependencies. As well as various configuration options.
Bottom line: just download the source, jump in, and try it.
That's absolutely the fastest, surest way to proceed.
'Hope that helps .. PSM