1998-01-16 07:13:05 -05:00
|
|
|
$LDFLAGS = "-L/usr/local/lib"
|
1998-01-16 07:19:22 -05:00
|
|
|
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
|
1998-01-16 07:13:05 -05:00
|
|
|
have_header("sys/un.h")
|
1998-01-16 07:19:22 -05:00
|
|
|
if have_func(test_func)
|
1998-01-16 07:13:05 -05:00
|
|
|
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
|