+##
+## Native WIN32 compilation under cygwin
+##
+AC_MSG_CHECKING(whether to compile native WIN32 code)
+AC_ARG_WITH(win32,
+ [ --with-win32 compile native WIN32 (MinGW) code (-mno-cygwin)],
+ [
+ AC_MSG_RESULT(yes)
+ AC_DEFINE([SILC_WIN32], [], [SILC_WIN32])
+ win32_support=true
+ CFLAGS="-mno-cygwin $CFLAGS"
+ LIBS="$LIBS -lwsock32"
+ ],
+ [
+ AC_MSG_RESULT(no)
+ win32_support=false
+ ])
+AM_CONDITIONAL(SILC_WIN32, test x$win32_support = xtrue)
+
+