Say I'm writing a module that requires the presence of libfoo. What is a portable way to make sure that version X.Y.Z or greater of the library, including header files exist, are present on the system? (By "portable", I mean at least across major linux distros, and perhaps to *BSD and macs.)