"<CMAKE_RC_COMPILER> <FLAGS> <DEFINES> -o <OBJECT> --output-format=coff <SOURCE>")
endif()
+# Generate config.h
+include(CheckIncludeFiles)
+include(CheckFunctionExists)
+set(CMAKE_EXTRA_INCLUDE_FILES winsock2.h)
+set(CMAKE_REQUIRED_LIBRARIES ws2_32)
+check_function_exists(inet_aton HAVE_INET_ATON)
+check_function_exists(inet_ntop HAVE_INET_NTOP)
+set(CMAKE_EXTRA_INCLUDE_FILES)
+set(CMAKE_REQUIRED_LIBRARIES)
+check_function_exists(snprintf HAVE_SNPRINTF)
+check_function_exists(strcasecmp HAVE_STRCASECMP)
+check_function_exists(strncasecmp HAVE_STRNCASECMP)
+check_function_exists(vsnprintf HAVE_VSNPRINTF)
+configure_file(config.h.cmake.in config.h)
+add_definitions(-DHAVE_CONFIG_H)
+include_directories(${CMAKE_BINARY_DIR})
add_subdirectory(common)
add_subdirectory(win)
--- /dev/null
+#cmakedefine HAVE_INET_ATON
+#cmakedefine HAVE_INET_NTOP
+#cmakedefine HAVE_SNPRINTF
+#cmakedefine HAVE_STRCASECMP
+#cmakedefine HAVE_STRNCASECMP
+#cmakedefine HAVE_VSNPRINTF