From db6964bbd27d365075618d8f5e9145d4291c3ccd Mon Sep 17 00:00:00 2001 From: Gurucharan Shetty Date: Sat, 16 Nov 2013 11:42:46 -0800 Subject: [PATCH] configure.ac: Identify when compiling on windows. Presence of windows.h will set the WIN32 variable. Signed-off-by: Gurucharan Shetty Acked-by: Ben Pfaff --- configure.ac | 1 + m4/openvswitch.m4 | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/configure.ac b/configure.ac index 379f32e72..13d2d31b9 100644 --- a/configure.ac +++ b/configure.ac @@ -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 diff --git a/m4/openvswitch.m4 b/m4/openvswitch.m4 index 012901f9f..6b9a378e6 100644 --- a/m4/openvswitch.m4 +++ b/m4/openvswitch.m4 @@ -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], -- 2.43.0