$OpenBSD: patch-configure_in,v 1.5 2006/07/28 22:36:41 steven Exp $
--- configure.in.orig	Fri Feb 17 09:39:55 2006
+++ configure.in	Mon Apr 17 20:41:15 2006
@@ -140,7 +140,7 @@ case $ac_sys_system/$ac_sys_release in
   # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
   # even though select is a POSIX function. Reported by J. Ribbens.
   # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
-  OpenBSD/2.* | OpenBSD/3.@<:@012345678@:>@) 
+  OpenBSD*)
     define_xopen_source=no;;
   # On Solaris 2.6, sys/wait.h is inconsistent in the usage
   # of union __?sigval. Reported by Stuart Bishop.
@@ -1381,12 +1381,7 @@ then
 	Linux*|GNU*) LDSHARED='$(CC) -shared';;
 	BSD/OS*/4*) LDSHARED="gcc -shared";;
 	OpenBSD*|FreeBSD*)
-		if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
-		then
-			LDSHARED="$CC -shared ${LDFLAGS}"
-		else
-			LDSHARED="ld -Bshareable ${LDFLAGS}"
-		fi;;
+		LDSHARED="$CC -shared ${LDFLAGS}";;
 	NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
 	OpenUNIX*|UnixWare*)
 		if test "$GCC" = "yes"
@@ -1528,9 +1523,10 @@ AC_CHECK_LIB(dld, shl_load)	# Dynamic li
 
 # only check for sem_ini if thread support is requested
 if test "$with_threads" = "yes" -o -z "$with_threads"; then
-    AC_SEARCH_LIBS(sem_init, pthread rt posix4) # 'Real Time' functions on Solaris
+#   AC_SEARCH_LIBS(sem_init, pthread rt posix4) # 'Real Time' functions on Solaris
 						# posix4 on Solaris 2.6
 						# pthread (first!) on Linux
+	LIBS="-pthread $(LIBS)"
 fi
 
 # check if we need libintl for locale functions
