Closed asdf8dfafjk closed 4 years ago
Honestly I don't know if this 100% the best way, but this is better than the current way where a hardcoded path is tested.
I do agree that this is better than the currently implementation, however just looking for x11
will cause problems on Ubuntu (and maybe Debian). Those platforms need x11-dev
and a few other weird packages. Maybe checkdeps.sh
should be replaced with some autoconf
implimentation? That's the most correct way to do this.
So I'm pretty much a beginner in this field- do you think that pkg-config is available for non-dev packages too? (My blind guess would be yes, likely for linking...) . So your point is probably pertinent but i cannot help you unfortunately...
Pkg-config is available for all sorts of packages, but the issue will be matching the package names to the header files, which is distro dependent.
I'll do some digging today to hopefully find the pedantically correct way to do this.
FWIW, when I sent my last PR (fuzzy match), I was warned by your program for every dependency I was missing. And I incrementally installed each upon error. Fontconfig xinerama, et al.
Here's another thought -- instead of autoconf, just try to compile the headers with $(CC) -c HEADER
and check if error occurred. Because cc
is used to expand the headers down the road anyway, this should be the easiest to implement.
I'll close this and implement with $(CC)
ASAP, but thanks for bringing this to my attention.
Use pkg-config to check for dependencies presence in a cross-platform and user-configurable way