mirror of
https://github.com/xdp-project/BNG-router.git
synced 2024-05-06 15:54:53 +00:00
configure: Support parsing weird clang versions
Seems some distributions will change the clang version output to be something like 'Ubuntu clang version 12.0.1-++20210918042554+fed41342a82f-1~exp1~20210918143322.141'. Fix the version parsing in configure to not barf on such weird version strings. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
This commit is contained in:
4
configure
vendored
4
configure
vendored
@@ -27,8 +27,8 @@ check_toolchain()
|
||||
fi;
|
||||
done
|
||||
|
||||
clang_version=$($CLANG --version | sed -n '/clang version/ s/clang version // p')
|
||||
if [ "${clang_version//\.[0-9\.]*/}" -lt "11" ]; then
|
||||
clang_version=$($CLANG --version | sed -n '/clang version/ s/^.*clang version // p')
|
||||
if [ "${clang_version//.*/}" -lt "11" ]; then
|
||||
echo "ERROR: Need clang version >= 11, found $clang_version"
|
||||
exit 1
|
||||
fi
|
||||
|
Reference in New Issue
Block a user