diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-04-03 13:10:04 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-04-03 13:10:04 +0000 |
commit | 7181490def5ad5670e2503e91c526eab1039b008 (patch) | |
tree | 439c20473667166349b8aace7e363ca11180105b | |
parent | 694207c73745eddae910c4239fe76b654c980eff (diff) |
* ext/socket/extconf.rb: Test functions and libraries after headers.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | ext/socket/extconf.rb | 42 |
2 files changed, 25 insertions, 21 deletions
@@ -1,3 +1,7 @@ +Wed Apr 3 22:09:25 2013 Tanaka Akira <[email protected]> + + * ext/socket/extconf.rb: Test functions and libraries after headers. + Wed Apr 3 21:23:29 2013 Tanaka Akira <[email protected]> * io.c (rb_io_seek_m): Accept :CUR, :END, :SET as "whence" argument. diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb index e9cf75033b..b25775c34d 100644 --- a/ext/socket/extconf.rb +++ b/ext/socket/extconf.rb @@ -2,27 +2,6 @@ require 'mkmf' $INCFLAGS << " -I$(topdir) -I$(top_srcdir)" -case RUBY_PLATFORM -when /(ms|bcc)win(32|64)|mingw/ - test_func = "WSACleanup" - have_library("ws2_32", "WSACleanup") -when /cygwin/ - test_func = "socket" -when /beos/ - test_func = "socket" - have_library("net", "socket") -when /haiku/ - test_func = "socket" - have_library("network", "socket") -when /i386-os2_emx/ - test_func = "socket" - have_library("socket", "socket") -else - test_func = "socket" - have_library("nsl", "t_open") # SunOS - have_library("socket", "socket") # SunOS -end - headers = [] unless $mswin or $bccwin or $mingw headers = %w<sys/types.h netdb.h string.h sys/socket.h netinet/in.h> @@ -83,6 +62,27 @@ have_type("struct ipv6_mreq", headers) # RFC 3493 have_struct_member('struct msghdr', 'msg_control', headers) unless $mswin or $mingw have_struct_member('struct msghdr', 'msg_accrights', headers) +case RUBY_PLATFORM +when /(ms|bcc)win(32|64)|mingw/ + test_func = "WSACleanup" + have_library("ws2_32", "WSACleanup", headers) +when /cygwin/ + test_func = "socket" +when /beos/ + test_func = "socket" + have_library("net", "socket", headers) +when /haiku/ + test_func = "socket" + have_library("network", "socket", headers) +when /i386-os2_emx/ + test_func = "socket" + have_library("socket", "socket", headers) +else + test_func = "socket" + have_library("nsl", "t_open", headers) # SunOS + have_library("socket", "socket", headers) # SunOS +end + if have_func(test_func, headers) have_func("sendmsg", headers) |