summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-07 02:40:22 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2006-06-07 02:40:22 +0000
commitae229456fb3548b9a3b0804f22c4bd2c9c3a87d9 (patch)
tree0db0792e8c8fb6ec8c30bffdf037da5a6c3a4854 /configure.in
parent4e19b0e00f437c15954733a0e93ebf47edada5d6 (diff)
* configure.in: add new configure option `--with-winsock2' for mingw.
* win32/Makefile.sub (config.h): define USE_WINSOCK2 in config.h instead of in CPPFLAGS. * ext/socket/extconf.rb: determine whether to use winsock2 or not by using with_config. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10224 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in15
1 files changed, 14 insertions, 1 deletions
diff --git a/configure.in b/configure.in
index e70d861414..1ceacbb5c5 100644
--- a/configure.in
+++ b/configure.in
@@ -187,6 +187,15 @@ cygwin*|mingw*)
sed -n '/^[[ ]]*dll name: \(msvc.*\)\.dll$/{s//\1/p;q;}'`],
[rb_cv_msvcrt=msvcrt])])
test "$rb_cv_msvcrt" = "" && AC_MSG_ERROR([must be linked to DLL])
+ AC_ARG_WITH(winsock2,
+ [ --with-winsock2 link winsock2 (MinGW only)], [
+ case $withval in
+ yes) with_winsock2=yes;;
+ *) with_winsock2=no;;
+ esac], [with_winsock2=no])
+ if test "$with_winsock2" = yes; then
+ AC_DEFINE(USE_WINSOCK2)
+ fi
esac
: ${enable_shared=yes}
;;
@@ -328,7 +337,11 @@ cygwin*) rb_cv_have_daylight=no
ac_cv_func__setjmp=no
ac_cv_func_setitimer=no
;;
-mingw*) LIBS="-lwsock32 $LIBS"
+mingw*) if test "$with_winsock2" = yes; then
+ LIBS="-lws2_32 $LIBS"
+ else
+ LIBS="-lwsock32 $LIBS"
+ fi
ac_cv_header_a_out_h=no
ac_cv_header_pwd_h=no
ac_cv_header_utime_h=no