X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=m4%2Fopenvswitch.m4;h=0890b9f40ac1b8b59b1d1552b7153f0db2e87502;hb=0b0544d706d10516d3122fbcce8f1dc1dec6cb92;hp=d65baba8c0644dd5e6d287e475cc2eb092e69d67;hpb=081f1381725f2f091119eb2e12991a6e86246260;p=openvswitch diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4 index d65baba8..0890b9f4 100644 --- a/m4/openvswitch.m4 +++ b/m4/openvswitch.m4 @@ -1,6 +1,6 @@ # -*- autoconf -*- -# Copyright (c) 2008, 2009 Nicira Networks. +# Copyright (c) 2008, 2009, 2010 Nicira Networks. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -81,28 +81,25 @@ AC_DEFUN([OVS_CHECK_OPENSSL], [ssl=false]) if test "$ssl" = true; then - dnl Make sure that pkg-config is installed. - m4_pattern_forbid([PKG_CHECK_MODULES]) - PKG_CHECK_MODULES([SSL], [libssl], - [HAVE_OPENSSL=yes], - [HAVE_OPENSSL=no - AC_MSG_WARN([Cannot find libssl: - - $SSL_PKG_ERRORS + dnl Make sure that pkg-config is installed. + m4_pattern_forbid([PKG_CHECK_MODULES]) + PKG_CHECK_MODULES([SSL], [libssl], + [HAVE_OPENSSL=yes], + [HAVE_OPENSSL=no + AC_MSG_WARN([Cannot find libssl: - OpenFlow connections over SSL will not be supported.])]) +$SSL_PKG_ERRORS +OpenFlow connections over SSL will not be supported.])]) + else + HAVE_OPENSSL=no fi + AC_SUBST([HAVE_OPENSSL]) AM_CONDITIONAL([HAVE_OPENSSL], [test "$HAVE_OPENSSL" = yes]) if test "$HAVE_OPENSSL" = yes; then AC_DEFINE([HAVE_OPENSSL], [1], [Define to 1 if OpenSSL is installed.]) fi]) -dnl Checks for libraries needed by lib/fault.c. -AC_DEFUN([OVS_CHECK_FAULT_LIBS], - [AC_CHECK_LIB([dl], [dladdr], [FAULT_LIBS=-ldl]) - AC_SUBST([FAULT_LIBS])]) - dnl Checks for libraries needed by lib/socket-util.c. AC_DEFUN([OVS_CHECK_SOCKET_LIBS], [AC_CHECK_LIB([socket], [connect]) @@ -233,3 +230,33 @@ 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_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]) + AM_MISSING_PROG([PYTHON], [python]) + if test $ovs_cv_python != no; then + PYTHON=$ovs_cv_python + fi])