build: extract c-ares version from header file #2478
Merged
+13
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
before this change, we get c-ares's version with pkg-config, but this could be wrong if we have multiple c-ares version installed into the system, and the one to be used is specified using CMake variable of
c-ares_ROOT
via the command line like:cmake -Dc-ares_ROOT=install-path/of/c-ares
as
pkg_check_modules()
does not respect thec-ares_ROOT
variable, it always find the .pc file in the default paths.in order to get the version of the c-ares library specified by the
c-ares_ROOT
variable, let's extract the version number in the header file. this should fix the build of seastar on fedora 41 with both c-ares 1.33 shipped by the fedora 41, and c-ares 1.32 installed manually.