From 4820642dcd2bf5e1f2ac3b0f9ed5b2602bc7c011 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Thu, 20 Apr 2017 18:41:29 +0200
Subject: Haiku patch


diff --git a/Makefile.in b/Makefile.in
index d9b2c4f..7c92d5c 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -90,6 +90,11 @@ SHAREDLIB_DIR = $(libdir)
 SHAREDLIB_LDFLAGS = -shared -Wl,-soname,$@
 SHAREDLIBSUFFIXNOVER = so
 SHAREDLIBSUFFIX = $(SHAREDLIBSUFFIXNOVER).$(SHAREDLIBVERSION)
+else ifeq (haiku,$(findstring haiku,@host@))
+SHAREDLIB_DIR = $(libdir)
+SHAREDLIB_LDFLAGS = -shared -Wl,-soname,$@
+SHAREDLIBSUFFIXNOVER = so
+SHAREDLIBSUFFIX = $(SHAREDLIBSUFFIXNOVER).$(SHAREDLIBVERSION)
 else ifeq (mingw,$(findstring mingw,@host@))
 SHAREDLIB_DIR = $(bindir)
 SHAREDLIB_LDFLAGS = -shared -Wl,--out-implib,libsrtp.dll.a
diff --git a/configure.in b/configure.in
index 445d823..bbafe0c 100644
--- a/configure.in
+++ b/configure.in
@@ -97,7 +97,7 @@ AC_CHECK_FUNCS(socket inet_aton usleep sigaction)
 
 dnl Find socket function if not found yet.
 if test "x$ac_cv_func_socket" = "xno"; then
-  AC_CHECK_LIB(socket, socket)
+  AC_SEARCH_LIBS(socket, socket network)
   AC_MSG_CHECKING([for socket in -lwsock32])
   SAVELIBS="$LIBS"
   LIBS="$LIBS -lwsock32"
-- 
2.12.2

