[sheepdog] [PATCH] check yasm before configure sheepdog

Liu Yuan namei.unix at gmail.com
Tue Sep 23 08:39:16 CEST 2014


On Tue, Sep 23, 2014 at 01:34:03PM +0800, Robin Dong wrote:
> From: Robin Dong <sanbai at taobao.com>
> 
> Add new configure option "--enable-isal" and check yasm when
> users enabled isal.
> 
> Signed-off-by: Robin Dong <sanbai at taobao.com>
> ---
>  configure.ac | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/configure.ac b/configure.ac
> index f78aa3b..7ceae75 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -229,6 +229,11 @@ AC_ARG_ENABLE([zookeeper],
>  	[ enable_zookeeper="no" ],)
>  AM_CONDITIONAL(BUILD_ZOOKEEPER, test x$enable_zookeeper = xyes)
>  
> +AC_ARG_ENABLE([isal],
> +	[  --enable-isal	   : build isal into sheepdog ],,
> +	[ enable_isal="no" ],)
> +AM_CONDITIONAL(BUILD_ISAL, test x$enable_isal = xyes)
> +
>  AC_ARG_ENABLE([shepherd],
>  	[  --enable-shepherd       : build shepherd cluster driver ],,
>  	[ enable_shepherd="no" ],)
> @@ -330,6 +335,13 @@ if test "x${enable_zookeeper}" = xyes; then
>  	PACKAGE_FEATURES="$PACKAGE_FEATURES zookeeper"
>  fi
>  
> +if test "x${enable_isal}" = xyes; then
> +	AC_CHECK_PROG([YASM], [yasm], yes, no)
> +	if test $YASM = "no"; then
> +		AC_MSG_ERROR([yasm is required])
> +	fi
> +fi

I don't think we need this option because sheep can dynamically decide it on the
fly by cpu_has_ssse3(). So I prefer it is always enabled thus upper packager can
notice this requirement and sort out the dependency.

By the way, for performance, we should check cpu_has_ssse3() and install proper
handler before loading binary like sha1 accleration, instead of checking
cpu_has_ssse3() every time in ec_decode_buffer(), which is a hot function for ec

Thanks
Yuan



More information about the sheepdog mailing list