Prefer `dependency` to look for libraries with pkgconf files

Hi,

In the FreeBSD ports an issue manifested with detecting subversion libraries.

if using cc.find_library() to detect them they could be missed if -L${LOCALBASE}/lib is not added to the library search path, which could happen in some circumstances.

Since subversion provides pkgconf files, using dependency() is more robust.

This patch should be doing just that without changing the logic of the build system.

Thanks in advance.

FreeBSD ports PR for your reference: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=287423

Merge request reports

Loading