Again, there is no reason for this to be Linux-specific, and making it so is harmful to other platforms and our general goal of portability. graphics/MesaLib/features.mk contains a MESALIB_SUPPORTS_DRI macro that can be used to check if you're on a platform where libdrm is likely to work.