$OpenBSD: patch-configure,v 1.3 2011/04/25 07:42:36 ajacoutot Exp $
--- configure.orig	Fri Apr 15 21:18:33 2011
+++ configure	Mon Apr 25 08:18:46 2011
@@ -558,6 +558,9 @@ ac_unique_file="src/zabbix_server/server.c"
 # Factoring default headers for most tests.
 ac_includes_default="\
 #include <stdio.h>
+#include <sys/socket.h>
+#include <sys/param.h>
+#include <netinet/in.h>
 #ifdef HAVE_SYS_TYPES_H
 # include <sys/types.h>
 #endif
@@ -8284,7 +8287,7 @@ $as_echo "yes" >&6; }
 
 			 JABBER_INCDIR=$IKSEMEL_CPPFLAGS
 			 JABBER_LIBDIR=$IKSEMEL_LIBS
-			 JABBER_LIBS="-liksemel"
+			 JABBER_LIBS="-liksemel -pthread"
 
 fi
        else
@@ -8294,7 +8297,7 @@ $as_echo_n "checking for iksemel support... " >&6; }
                if test -f $_libiksemel_with/include/iksemel.h; then
                        JABBER_INCDIR=-I$_libiksemel_with/include
                        JABBER_LIBDIR=-L$_libiksemel_with/lib
-                       JABBER_LIBS="-liksemel"
+                       JABBER_LIBS="-liksemel -pthread"
 		       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
                else
@@ -10034,7 +10037,7 @@ $as_echo "no" >&6; }
        if test "x$found_ldap" != "xno" ; then
 
                if test "x$enable_static" = "xyes"; then
-                       LDAP_LIBS=" -lgnutls -lpthread -lsasl2 $LDAP_LIBS"
+                       LDAP_LIBS=" -lgnutls -pthread -lsasl2 $LDAP_LIBS"
                fi
 
                LDAP_CPPFLAGS=-I$LDAP_INCDIR
@@ -10094,13 +10097,13 @@ else
   as_fn_error "Not found GnuTLS library" "$LINENO" 5
 fi
 
-                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lpthread" >&5
-$as_echo_n "checking for main in -lpthread... " >&6; }
+                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -pthread" >&5
+$as_echo_n "checking for main in -pthread... " >&6; }
 if test "${ac_cv_lib_pthread_main+set}" = set; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread  $LIBS"
+LIBS="-pthread  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -10129,7 +10132,7 @@ if test "x$ac_cv_lib_pthread_main" = x""yes; then :
 #define HAVE_LIBPTHREAD 1
 _ACEOF
 
-  LIBS="-lpthread $LIBS"
+  LIBS="-pthread $LIBS"
 
 else
   as_fn_error "Not found Pthread library" "$LINENO" 5
