$OpenBSD: patch-configure_in,v 1.2 2001/04/21 15:37:57 brad Exp $
--- configure.in.orig	Mon Mar 26 22:39:19 2001
+++ configure.in	Fri Apr 20 21:18:32 2001
@@ -1199,7 +1199,11 @@ case "$target" in
             COPY_ARCH_SRC(src/thread, linux, SDL_systhread_c.h)
             COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex.c)
             COPY_ARCH_SRC(src/thread, linux, SDL_sysmutex_c.h)
-            COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
+	    if test x$use_pthreads = xyes -a x$enable_pthread_sem != xyes; then
+		COPY_ARCH_SRC(src/thread, generic, SDL_syssem.c)
+	    else
+		COPY_ARCH_SRC(src/thread, linux, SDL_syssem.c)
+	    fi
             COPY_ARCH_SRC(src/thread, generic, SDL_syssem_c.h)
             COPY_ARCH_SRC(src/thread, linux, SDL_syscond.c)
             COPY_ARCH_SRC(src/thread, generic, SDL_syscond_c.h)
@@ -1788,6 +1792,10 @@ fi
 
 if test $ARCH = solaris; then
   SDL_RLD_FLAGS="-R\${exec_prefix}/lib"
+fi
+
+if test $ARCH = openbsd; then
+  SDL_RLD_FLAGS="-Wl,-rpath,\${exec_prefix}/lib -Wl,-rpath,\${X11BASE}/lib"
 fi
 
 dnl Output the video drivers we use
