From 325010bf918c963325dda9d81f1ff3cf62a78f74 Mon Sep 17 00:00:00 2001 From: Richael Zhuang Date: Tue, 10 Mar 2020 14:04:17 +0800 Subject: [PATCH] configure: check nasm only on x86 For other architectures like arm64 don't depend on nasm package when using isa-l or crypto. Limit the check to x86. Signed-off-by: Richael Zhuang Change-Id: I8ee1a711fc76c25a9173853dbb075dffe7df056b Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1208 Tested-by: SPDK CI Jenkins Reviewed-by: Aleksey Marchuk Reviewed-by: Ben Walker --- configure | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/configure b/configure index 21bd4c129..7fd2a61d6 100755 --- a/configure +++ b/configure @@ -145,17 +145,20 @@ if [[ "$OSTYPE" == "freebsd"* ]]; then echo "Notice: Vhost, rte_vhost library and virtio are only supported on Linux. Turning off default feature." fi -ver=$(nasm -v 2>/dev/null | 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 - # ISA-L, compression & crypto require NASM version 2.13.03 or newer. - CONFIG[ISAL]=n - CONFIG[CRYPTO]=n - CONFIG[IPSEC_MB]=n - CONFIG[REDUCE]=n - HAVE_NASM=n - echo "Notice: ISA-L, compression & crypto require NASM version 2.13.03 or newer. Turning off default ISA-L and crypto features." -else - HAVE_NASM=y +#check nasm only on x86 +if [[ $arch == x86_64* ]]; then + ver=$(nasm -v 2>/dev/null | 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 + # ISA-L, compression & crypto require NASM version 2.13.03 or newer. + CONFIG[ISAL]=n + CONFIG[CRYPTO]=n + CONFIG[IPSEC_MB]=n + CONFIG[REDUCE]=n + HAVE_NASM=n + echo "Notice: ISA-L, compression & crypto require NASM version 2.13.03 or newer. Turning off default ISA-L and crypto features." + else + HAVE_NASM=y + fi fi function check_dir() { @@ -613,7 +616,7 @@ if [[ "${CONFIG[FC]}" = "y" ]]; then fi if [[ "${CONFIG[ISAL]}" = "y" ]] || [[ "${CONFIG[CRYPTO]}" = "y" ]]; then - if [[ "${HAVE_NASM}" = "n" ]]; then + if [[ "${HAVE_NASM}" = "n" ]] && [[ $arch == x86_64* ]]; then echo "ERROR: ISA-L, compression & crypto require NASM version 2.13.03 or newer." echo "Please install or upgrade them re-run this script." exit 1