1
0
mirror of https://github.com/xdp-project/BNG-router.git synced 2024-05-06 15:54:53 +00:00

configure: avoid bashisms

The variable substitution used to parse the clang version was a bashism, so
it broke on Debian/Ubuntu. So let's just use sed instead.

Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
This commit is contained in:
Toke Høiland-Jørgensen
2021-10-11 17:05:13 +02:00
parent 7003079d87
commit 51381f01b1

5
configure vendored
View File

@ -28,8 +28,9 @@ check_toolchain()
done
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"
clang_major_version=$(echo "$clang_version" | sed 's/\..*$//')
if [ "$clang_major_version" -lt "11" ]; then
echo "ERROR: Need clang version >= 11, found $clang_major_version ($clang_version)"
exit 1
fi
echo "clang: $clang_version"