2009-05-07 15:38:06 +03:00
|
|
|
AC_DEFUN([AC_REQUIRE_SOCKET],
|
|
|
|
[
|
|
|
|
AC_SEARCH_LIBS(socket, [xnet bsd socket inet], [have_socket=yes])
|
2009-07-26 16:11:53 +03:00
|
|
|
if test x"$have_socket" = xyes; then
|
2009-05-07 15:38:06 +03:00
|
|
|
AC_SEARCH_LIBS(gethostbyname, [bsd socket inet netinet])
|
|
|
|
AC_CHECK_MEMBERS([struct linger.l_linger], , , [
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
|
|
|
])
|
|
|
|
else
|
|
|
|
AC_ERROR([Couldnt find socket functions])
|
|
|
|
fi
|
|
|
|
])
|