diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-01-16 12:19:22 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-01-16 12:19:22 +0000 |
commit | 7ea2ceddb832b9973694fecac9fe3c30400735ba (patch) | |
tree | a9b60dec20fa5f7f52ca7c8113195f2d65728a22 /ext/socket/extconf.rb | |
parent | 62e41d3f2e48422bbdf1bb2db83ae60b255b1a1a (diff) | |
download | ruby-7ea2ceddb832b9973694fecac9fe3c30400735ba.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r11,
which included commits to RCS files with non-trunk default branches.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/extconf.rb')
-rw-r--r-- | ext/socket/extconf.rb | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb index bbde1a0c35..f719723864 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") |