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

Use pkg-config #1

Open
robo9k opened this issue Dec 21, 2014 · 3 comments
Open

Use pkg-config #1

robo9k opened this issue Dec 21, 2014 · 3 comments

Comments

@robo9k
Copy link
Owner

robo9k commented Dec 21, 2014

Right now we unconditionally link with -l magic.

This behaviour should be changed to attempt using pkg-config first, then falling back to the hardlinked library name.

@robo9k
Copy link
Owner Author

robo9k commented Jan 25, 2015

It looks like the file package does not install a libmagic.pc, so pkg-config does not know about it.
Since they're using the GNU autotools, adding support should not be difficult (needs an upstream ticket).

Getting a new file / libmagic package onto Travis CI might require using a PPA.

@robo9k
Copy link
Owner Author

robo9k commented Oct 20, 2021

Upstream issue 0000136 added a libmagic.pc for static linking, available since version 5.39

@robo9k
Copy link
Owner Author

robo9k commented Aug 26, 2023

While vcpkg includes the required libmagic.pc, it does not provide a pkg-config binary. It's possible to vcpkg install pkgconf for an alternate binary (see https://github.com/pkgconf/pkgconf ) that unfortunately doesn't become part of PATH.
The pkg-config crate should work with either binary, but would need environment variables instead of mostly effortless cargo vcpkg build && cargo build.

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

No branches or pull requests

1 participant