aboutsummaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2009-09-14 10:05:13 -0700
committerBen Pfaff <blp@nicira.com>2009-09-14 10:05:13 -0700
commit3b135da329687c69d3a0f1689621f75cc4888d6f (patch)
treefc9e7d86367e6dd0a787a354b6850c6f8b2ee440 /m4
parent39fb08818bbd9c438dbf23caa89937c663451b5a (diff)
New utility ovs-vsctl.
Diffstat (limited to 'm4')
-rw-r--r--m4/openvswitch.m428
1 files changed, 28 insertions, 0 deletions
diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4
index d65baba8..b7267438 100644
--- a/m4/openvswitch.m4
+++ b/m4/openvswitch.m4
@@ -233,3 +233,31 @@ AC_DEFUN([OVS_CHECK_PCRE],
if test "$HAVE_PCRE" = yes; then
AC_DEFINE([HAVE_PCRE], [1], [Define to 1 if libpcre is installed.])
fi])
+
+dnl Checks for Python 2.x, x >= 4.
+AC_DEFUN([OVS_CHECK_PYTHON],
+ [AC_ARG_VAR([PYTHON], [path to Python 2.x])
+ AC_CACHE_CHECK(
+ [for Python 2.x for x >= 4],
+ [ovs_cv_python],
+ [if test -n "$PYTHON"; then
+ ovs_cv_python=$PYTHON
+ else
+ ovs_cv_python=no
+ for binary in python python2.4 python2.5; do
+ ovs_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for dir in $PATH; do
+ IFS=$ovs_save_IFS
+ test -z "$dir" && dir=.
+ if test -x $dir/$binary && $dir/$binary -c 'import sys
+if sys.hexversion >= 0x02040000 and sys.hexversion < 0x03000000:
+ sys.exit(0)
+else:
+ sys.exit(1)'; then
+ ovs_cv_python=$dir/$binary
+ break 2
+ fi
+ done
+ done
+ fi])
+ PYTHON=$ovs_cv_python])