$OpenBSD: patch-configure_in,v 1.3 2007/04/24 23:32:47 djm Exp $
--- configure.in.orig	Mon Mar 12 21:50:51 2007
+++ configure.in	Fri Apr 20 13:29:23 2007
@@ -201,7 +201,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.@<:@0123456789@:>@ | OpenBSD/4.@<:@0@:>@) 
+  OpenBSD*) 
     define_xopen_source=no;;
   # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
   # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
@@ -1509,19 +1509,7 @@ then
 			LDSHARED="ld -Bshareable ${LDFLAGS}"
 		fi;;
 	OpenBSD*)
-		if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
-		then
-				LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
-		else
-				case `uname -r` in
-				[[01]].* | 2.[[0-7]] | 2.[[0-7]].*)
-				   LDSHARED="ld -Bshareable ${LDFLAGS}"
-				   ;;
-				*)
-				   LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
-				   ;;
-				esac
-		fi;;
+		LDSHARED="$CC -shared ${LDFLAGS}";;
 	NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
 	OpenUNIX*|UnixWare*)
 		if test "$GCC" = "yes"
@@ -1665,9 +1653,10 @@ AC_CHECK_LIB(dld, shl_load)	# Dynamic linking for HP-U
 
 # 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
