Since Python 2.7 and python-six are needed to build Open vSwitch,
./configure should return an error if they are missing or if they are too old

Signed-off-by: Timothy Redaelli <tredae...@redhat.com>
---
 m4/openvswitch.m4 | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4
index 0b2cc27..d41bffb 100644
--- a/m4/openvswitch.m4
+++ b/m4/openvswitch.m4
@@ -341,11 +341,13 @@ else:
             fi
           done
         done
-        if test $ovs_cv_python != no; then
-          if test -x "$ovs_cv_python" && ! "$ovs_cv_python" -c 'import six' 
>/dev/null 2>&1; then
-            ovs_cv_python=no
-            AC_MSG_WARN([Missing Python six library.])
-          fi
+      fi
+      if test $ovs_cv_python = no; then
+        AC_MSG_ERROR([cannot find python 2.7 or higher.])
+      else
+        if test -x "$ovs_cv_python" && ! "$ovs_cv_python" -c 'import six ; 
six.moves.range' >/dev/null 2>&1; then
+          ovs_cv_python=no
+          AC_MSG_ERROR([Missing Python six library or version too old.])
         fi
       fi])
    AC_SUBST([HAVE_PYTHON])
-- 
2.9.3

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to