[sheepdog] [PATCH] check yasm before configure sheepdog

Robin Dong robin.k.dong at gmail.com
Tue Sep 23 07:34:03 CEST 2014


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
+
 if test "x${enable_shepherd}" = xyes; then
 	AC_DEFINE_UNQUOTED([HAVE_SHEPHERD], 1, [have shepherd])
 	PACKAGE_FEATURES="$PACKAGE_FEATURES shepherd"
-- 
1.9.1




More information about the sheepdog mailing list