The libraries are first looked for using pkg-config's macro
PKG_CHECK_MODULES. If a library isn't found by pkg-config, and many
libraries used don't have pkg-config files, then the library is checked
using the macro AC_CHECK_LIB, which should be good enough to find
libraries on systems that aren't too weird. The include directories for
each of these libraries, when not found by pkg-config, are searched for
using find.
The libraries are first looked for using pkg-config's macro PKG_CHECK_MODULES. If a library isn't found by pkg-config, and many libraries used don't have pkg-config files, then the library is checked using the macro AC_CHECK_LIB, which should be good enough to find libraries on systems that aren't too weird. The include directories for each of these libraries, when not found by pkg-config, are searched for using find.