1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext/socket/extconf.rb
matz 210367ec88 This commit was generated by cvs2svn to compensate for changes in r372,
which included commits to RCS files with non-trunk default branches.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@373 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1999-01-20 04:59:39 +00:00

30 lines
709 B
Ruby

require 'mkmf'
$LDFLAGS = "-L/usr/local/lib" if File.directory?("/usr/local/lib")
case PLATFORM
when /mswin32/
test_func = "WSACleanup"
have_library("wsock32", "WSACleanup")
when /cygwin32/
test_func = "socket"
when /beos/
test_func = "socket"
have_library("net", "socket")
else
test_func = "socket"
have_library("nsl", "t_open")
have_library("socket", "socket")
end
have_header("sys/un.h")
if have_func(test_func)
have_func("inet_aton")
have_func("hsterror")
unless have_func("gethostname")
have_func("uname")
end
if ENV["SOCKS_SERVER"] # test if SOCKSsocket needed
if have_library("socks", "Rconnect")
$CFLAGS="-DSOCKS"
end
end
create_makefile("socket")
end