classifier: Use array for subtables instead of a list.
[sliver-openvswitch.git] / m4 / openvswitch.m4
index ee7e96a..fa741f6 100644 (file)
@@ -1,6 +1,6 @@
 # -*- autoconf -*-
 
-# Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
+# Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014 Nicira, Inc.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -63,6 +63,27 @@ AC_DEFUN([OVS_CHECK_WIN32],
                    [WIN32=no])
    AM_CONDITIONAL([WIN32], [test "$WIN32" = yes])
    if test "$WIN32" = yes; then
+      AC_ARG_WITH([pthread],
+         [AS_HELP_STRING([--with-pthread=DIR],
+            [root of the pthread-win32 directory])],
+         [
+            case "$withval" in
+            "" | y | ye | yes | n | no)
+            AC_MSG_ERROR([Invalid --with-pthread value])
+              ;;
+            *)
+            PTHREAD_INCLUDES="-I$withval/include"
+            PTHREAD_LDFLAGS="-L$withval/lib/x86"
+            PTHREAD_LIBS="-lpthreadVC2"
+            AC_SUBST([PTHREAD_INCLUDES])
+            AC_SUBST([PTHREAD_LDFLAGS])
+            AC_SUBST([PTHREAD_LIBS])
+              ;;
+            esac
+         ], [
+            AC_MSG_ERROR([pthread directory not specified])
+         ]
+      )
       AC_DEFINE([WIN32], [1], [Define to 1 if building on WIN32.])
       AH_BOTTOM([#ifdef WIN32
 #include "include/windows/windefs.h"
@@ -75,7 +96,6 @@ AC_DEFUN([OVS_CHECK_NETLINK],
                    [HAVE_NETLINK=yes],
                    [HAVE_NETLINK=no],
                    [#include <sys/socket.h>
-   #include <linux/types.h>
    ])
    AM_CONDITIONAL([HAVE_NETLINK], [test "$HAVE_NETLINK" = yes])
    if test "$HAVE_NETLINK" = yes; then
@@ -242,21 +262,6 @@ AC_DEFUN([OVS_CHECK_DOT],
      fi])
    AM_CONDITIONAL([HAVE_DOT], [test "$ovs_cv_dot" = yes])])
 
-dnl Checks for pyuic4.
-AC_DEFUN([OVS_CHECK_PYUIC4],
-  [AC_CACHE_CHECK(
-    [for pyuic4],
-    [ovs_cv_pyuic4],
-    [if (pyuic4 --version) >/dev/null 2>&1; then
-       ovs_cv_pyuic4=pyuic4
-     else
-       ovs_cv_pyuic4=no
-     fi])
-   AM_MISSING_PROG([PYUIC4], [pyuic4])
-   if test $ovs_cv_pyuic4 != no; then
-     PYUIC4=$ovs_cv_pyuic4
-   fi])
-
 dnl Checks whether $PYTHON supports the module given as $1
 AC_DEFUN([OVS_CHECK_PYTHON_MODULE],
   [AC_REQUIRE([OVS_CHECK_PYTHON])
@@ -275,30 +280,6 @@ sys.exit(0)' >&AS_MESSAGE_LOG_FD 2>&1; then
         fi
       fi])])
 
-dnl Checks for Python modules needed by ovsdbmonitor.
-AC_DEFUN([OVS_CHECK_OVSDBMONITOR],
-  [OVS_CHECK_PYTHON_MODULE([PySide.QtCore])
-   OVS_CHECK_PYTHON_MODULE([PyQt4.QtCore])
-   OVS_CHECK_PYTHON_MODULE([twisted.conch.ssh])
-   OVS_CHECK_PYTHON_MODULE([twisted.internet])
-   OVS_CHECK_PYTHON_MODULE([twisted.application])
-   OVS_CHECK_PYTHON_MODULE([json])
-   OVS_CHECK_PYTHON_MODULE([zope.interface])
-   if (test $ovs_cv_py_PySide_QtCore = yes \
-       || test $ovs_cv_py_PyQt4_QtCore = yes) \
-      && test $ovs_cv_py_twisted_conch_ssh = yes \
-      && test $ovs_cv_py_twisted_internet = yes \
-      && test $ovs_cv_py_twisted_application = yes \
-      && test $ovs_cv_py_json = yes \
-      && test $ovs_cv_py_zope_interface = yes; then
-     BUILD_OVSDBMONITOR=yes
-   else
-     BUILD_OVSDBMONITOR=no
-   fi
-   AC_MSG_CHECKING([whether to build ovsdbmonitor])
-   AC_MSG_RESULT([$BUILD_OVSDBMONITOR])
-   AM_CONDITIONAL([BUILD_OVSDBMONITOR], [test $BUILD_OVSDBMONITOR = yes])])
-
 dnl Checks for missing python modules at build time
 AC_DEFUN([OVS_CHECK_PYTHON_COMPAT],
   [OVS_CHECK_PYTHON_MODULE([uuid])