mc/m4.include/vfs/socket.m4
Stan. S. Krupoderov b9d2d3fc7f Ticket #185 (Check for gethostbyname with nsl)
socket.m4: add nsl in search for gethostbyname
2009-08-04 14:12:39 +04:00

14 lines
388 B
Plaintext

AC_DEFUN([AC_REQUIRE_SOCKET],
[
AC_SEARCH_LIBS(socket, [xnet bsd socket inet], [have_socket=yes])
if test x"$have_socket" = x"yes"; then
AC_SEARCH_LIBS(gethostbyname, [bsd socket inet netinet nsl])
AC_CHECK_MEMBERS([struct linger.l_linger], , , [
#include <sys/types.h>
#include <sys/socket.h>
])
else
AC_ERROR([Couldnt find socket functions])
fi
])