Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
eugpermar opened this issue May 25, 2016 · 3 comments
Open

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

eugpermar opened this issue May 25, 2016 · 3 comments

Comments

@eugpermar
Copy link
Contributor

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.

@edenhill
Copy link
Owner

Would having a --pkg-config-flags="--atleast-version X ... .." flag to mkl_lib_check be sufficient?

@edenhill
Copy link
Owner

I think your second solution is good too, that should be fixed either way.

@eugpermar
Copy link
Contributor Author

All solutions are fine for me, but I think that force the check using pkg-config provided cflags and libs is the best solution. If you think it's ok, I will go with it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants