Prepare for post-2.2.0 (2.2.90).
[sliver-openvswitch.git] / m4 / openvswitch.m4
index c0af6d4..fa741f6 100644 (file)
@@ -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