From 53e635694b577f06e47fcff1fa9f874bf1030319 Mon Sep 17 00:00:00 2001
From: Rong Yan <rongyan236@gmail.com>
Date: Mon, 13 Oct 2014 08:32:44 +0000
Subject: [PATCH] configure: fix bug to ensure that  HAVE_VSX is only enabled
 when HAVE_ALTIVEC is enabled and in LE environment

---
 configure | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/configure b/configure
index cda463d..f801ebd 100755
--- a/configure
+++ b/configure
@@ -4389,8 +4389,10 @@ unsigned int endian = 'B' << 24 | 'I' << 16 | 'G' << 8 | 'E';
 EOF
 od -t x1 $TMPO | grep -q '42 *49 *47 *45' && enable bigendian
 
+# The macro HAVE_VSX is used to fixing bug of altivec implementation
+# on POWER LE which use vsx intrinsics
 if  [ "$cpu" = "power7" ] || [ "$cpu" = "power8" ] ;then
-    if ! enabled bigendian ;then
+    if ! enabled bigendian && enabled altivec ;then
         enable vsx
     fi
 fi
-- 
1.9.1

