$OpenBSD: patch-ptlib_m4,v 1.2 2011/10/26 16:59:09 ajacoutot Exp $
--- ptlib.m4.orig	Fri Oct 14 08:55:01 2011
+++ ptlib.m4	Wed Oct 26 10:28:46 2011
@@ -363,7 +363,10 @@ AC_DEFUN([PTLIB_FIND_OPENLDAP],
                             dnl posix4 is required by libldap_r on Solaris
                             ptlib_openldap_libs="-lposix4"
                             ;;
-                            * )
+            openbsd*)
+                            ptlib_openldap_libs="-llber -lldap_r -pthread"
+                            ;;
+            * )
                             ptlib_openldap_libs="-llber -lldap_r"
             esac
 
