]> git.pond.sub.org Git - empserver/blob - m4/my_windows_api.m4
w32: Modernize for MinGW 6.0.0, and clean up
[empserver] / m4 / my_windows_api.m4
1 AC_DEFUN([MY_WINDOWS_API],
2 [
3         AC_MSG_CHECKING([whether compiling for Windows API])
4         AC_COMPILE_IFELSE(
5                 [AC_LANG_SOURCE([[#ifdef _WIN32
6 { /* Here's a nickel, kid */
7 #endif]])],
8                 [Windows_API=no],
9                 [Windows_API=yes])
10         AC_MSG_RESULT([$Windows_API])
11         if test $Windows_API = yes; then
12                 AC_DEFINE([WINDOWS], 1, [Define if compiling for Windows API])
13                 AC_DEFINE([WIN32_LEAN_AND_MEAN], 1,
14                         [Define to make Windows includes pull in less junk])
15                 AC_DEFINE([_WIN32_WINNT], 0x0601,
16                         [Request Windows 7])
17                 LIBS_SOCKETS="-lws2_32"
18         else
19                 LIBS_SOCKETS=
20         fi
21         AC_SUBST([LIBS_SOCKETS])
22 ])