mklove icon indicating copy to clipboard operation
mklove copied to clipboard

Can't specify a version if pkg-config is available

Open eugpermar opened this issue 8 years ago • 3 comments

Currently, mklove skips checks if the library is found via pkg-config. In particular, I'm trying to check that a library has a specific version, or if it has a specific symbol.

Trying to do version checking:

mkl_lib_check --static=-lyajl "yajl" "" fail CC "-lyajl" \
       "#include <yajl_version.h>
#if YAJL_MAYOR < 2 || YAJL_MINOR < 1
#error Need yajl library version >=2.1.0
#endif"

However, yajl version is being accepted via pkg-config, and skipping check. I think that mklove should provide an interface to call pkg-config --modversion and, ideally, --atleast-version, --exact-version and --max-version.

Another solution, maybe more generic and fast to implement, could be to force the check even if the pkg-config has found the library.

If you choose an option or provide me a better one, I can send you a PR.

eugpermar avatar May 25 '16 11:05 eugpermar