summaryrefslogtreecommitdiff
path: root/ext/socket/extconf.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-01-16 12:19:22 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1998-01-16 12:19:22 +0000
commitfd1d8cdc09ed86e4a0812120a17ff0d7b04adcaf (patch)
tree341289a84a427f1e92425c7ebf82d2f1733e9a40 /ext/socket/extconf.rb
parentf12baed5df6d3c213dd75d2f0d9f36bb179fb843 (diff)
*** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/RUBY@11 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/extconf.rb')
-rw-r--r--ext/socket/extconf.rb17
1 files changed, 13 insertions, 4 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index bbde1a0c358..f7197238641 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -1,9 +1,18 @@
$LDFLAGS = "-L/usr/local/lib"
-have_library("wsock32", "cygwin32_socket") or have_library("socket", "socket")
-have_library("inet", "gethostbyname")
-have_library("nsl", "gethostbyname")
+case PLATFORM
+when /mswin32/
+ test_func = "WSACleanup"
+ have_library("wsock32", "WSACleanup")
+when /cygwin32/
+ test_func = "cygwin32_socket"
+else
+ test_func = "socket"
+ have_library("socket", "socket")
+ have_library("inet", "gethostbyname")
+ have_library("nsl", "gethostbyname")
+end
have_header("sys/un.h")
-if have_func("socket") or have_func("cygwin32_socket")
+if have_func(test_func)
have_func("hsterror")
unless have_func("gethostname")
have_func("uname")