$OpenBSD: patch-configure_in,v 1.2 2004/03/01 04:36:12 jolan Exp $
--- configure.in.orig	2003-11-18 13:59:39.000000000 -0600
+++ configure.in	2004-02-29 22:23:16.000000000 -0600
@@ -136,7 +136,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.@<:@01234@:>@) 
+  OpenBSD/2.* | OpenBSD/3.@<:@012345@:>@) 
     define_xopen_source=no;;
   # On Solaris 2.6, sys/wait.h is inconsistent in the usage
   # of union __?sigval. Reported by Stuart Bishop.
@@ -1279,14 +1279,14 @@ then
 	Linux*|GNU*) LDSHARED='$(CC) -shared';;
 	dgux*) LDSHARED="ld -G";;
 	BSD/OS*/4*) LDSHARED="gcc -shared";;
-	OpenBSD*|FreeBSD*)
+	FreeBSD*)
 		if [[ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]]
 		then
 			LDSHARED="cc -shared ${LDFLAGS}"
 		else
 			LDSHARED="ld -Bshareable ${LDFLAGS}"
 		fi;;
-	NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
+	OpenBSD*|NetBSD*) LDSHARED="${CC} -shared ${LDFLAGS}";;
 	OpenUNIX*|UnixWare*)
 		if test "$GCC" = "yes"
 		then LDSHARED='$(CC) -shared'
@@ -1616,8 +1616,8 @@ yes
     # on HP/UX, pthread.h renames pthread_create to a different symbol name.
     # So we really have to include pthread.h, and then link.
     _libs=$LIBS
-    LIBS="$LIBS -lpthread"
-    AC_MSG_CHECKING([for pthread_create in -lpthread])
+    LIBS="$LIBS -pthread"
+    AC_MSG_CHECKING([for pthread_create in -pthread])
     AC_TRY_LINK([#include <pthread.h>
 
 void * start_routine (void *arg) { exit (0); }], [
@@ -1640,7 +1640,7 @@ pthread_create (NULL, NULL, start_routin
     THREADOBJ="Python/thread.o"],[
     AC_CHECK_LIB(pthreads, pthread_create, [AC_DEFINE(WITH_THREAD)
     posix_threads=yes
-    LIBS="$LIBS -lpthreads"
+    LIBS="$LIBS -pthreads"
     THREADOBJ="Python/thread.o"], [
     AC_CHECK_LIB(c_r, pthread_create, [AC_DEFINE(WITH_THREAD)
     posix_threads=yes
@@ -1655,7 +1655,7 @@ pthread_create (NULL, NULL, start_routin
     THREADOBJ="Python/thread.o"], [
     AC_CHECK_LIB(pthread, __pthread_create_system, [AC_DEFINE(WITH_THREAD)
     posix_threads=yes
-    LIBS="$LIBS -lpthread"
+    LIBS="$LIBS -pthread"
     THREADOBJ="Python/thread.o"], [
     AC_CHECK_LIB(cma, pthread_create, [AC_DEFINE(WITH_THREAD)
     posix_threads=yes
