Normally the X11 headers are available without needing any special -I options, since they are at /usr/include/X11/Xlib.h It's quite possible that the Mesa build system may be broken if you have them somewhere else, since possibly no one tested that. Just figure out how to fix it and send a patch :)