configure.ac: Identify when compiling on windows.
authorGurucharan Shetty <gshetty@nicira.com>
Sat, 16 Nov 2013 19:42:46 +0000 (11:42 -0800)
committerGurucharan Shetty <gshetty@nicira.com>
Mon, 18 Nov 2013 20:54:49 +0000 (12:54 -0800)
Presence of windows.h will set the WIN32 variable.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
configure.ac
m4/openvswitch.m4

index 379f32e..13d2d31 100644 (file)
@@ -48,6 +48,7 @@ AC_SEARCH_LIBS([pthread_sigmask], [pthread])
 AC_FUNC_STRERROR_R
 
 OVS_CHECK_ESX
+OVS_CHECK_WIN32
 OVS_CHECK_COVERAGE
 OVS_CHECK_NDEBUG
 OVS_CHECK_NETLINK
index 012901f..6b9a378 100644 (file)
@@ -56,6 +56,16 @@ AC_DEFUN([OVS_CHECK_ESX],
       AC_DEFINE([ESX], [1], [Define to 1 if building on ESX.])
    fi])
 
+dnl Checks for WINDOWS.
+AC_DEFUN([OVS_CHECK_WIN32],
+  [AC_CHECK_HEADER([windows.h],
+                   [WIN32=yes],
+                   [WIN32=no])
+   AM_CONDITIONAL([WIN32], [test "$WIN32" = yes])
+   if test "$WIN32" = yes; then
+      AC_DEFINE([WIN32], [1], [Define to 1 if building on WIN32.])
+   fi])
+
 dnl Checks for Netlink support.
 AC_DEFUN([OVS_CHECK_NETLINK],
   [AC_CHECK_HEADER([linux/netlink.h],