]> git.pond.sub.org Git - empserver/blob - m4/my_windows_api.m4
Make: Get SHELL from Autoconf
[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                 LIBS_SOCKETS="-lws2_32"
16         else
17                 LIBS_SOCKETS=
18         fi
19         AC_SUBST([LIBS_SOCKETS])
20 ])