Devel::CheckLib is a perl module that checks whether a particular C
library and its headers are available.
