From 00a6c491d214b54041dcec419dbccd53ba8b3480 Mon Sep 17 00:00:00 2001 From: Darek Stojaczyk Date: Tue, 30 Apr 2019 07:56:39 +0200 Subject: [PATCH] configure: try harder to parse nasm version Nasm doesn't always include the patch version in its version string and we currently detect 2.14 as older than 2.13.03. Fix it by checking the major and minor version numbers separately. Change-Id: I37d1129775b17d252b84a911ee1c849f4f0e2ec7 Reported-by: James Bergsten Signed-off-by: Darek Stojaczyk Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452533 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto Reviewed-by: Ben Walker --- configure | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 46ec210b7..6ecb338fa 100755 --- a/configure +++ b/configure @@ -432,7 +432,8 @@ than or equal to 4.14 will see significantly reduced performance. fi if [[ "${CONFIG[ISAL]}" = "y" ]] || [[ "${CONFIG[CRYPTO]}" = "y" ]]; then - if [[ $(nasm -v | awk '{print $3}' | sed 's/[^0-9]*//g') -lt "21303" ]]; then + ver=$(nasm -v | awk '{print $3}' | sed 's/[^0-9]*//g') + if [[ "${ver:0:1}" -le "2" ]] && [[ "${ver:0:3}" -le "213" ]] && [[ "${ver:0:5}" -lt "21303" ]]; then echo "Notice: ISA-L, compression & crypto auto-disabled due to nasm dependency." echo "These features require NASM version 2.13.03 or newer. Please install" echo "or upgrade then re-run this script."