$OpenBSD: patch-configure_in,v 1.18 2002/05/26 04:11:16 wcobb Exp $
--- configure.in.orig	Sat Apr 13 20:57:24 2002
+++ configure.in	Sun May 26 01:07:30 2002
@@ -468,7 +468,12 @@ CheckNASM()
                   NASMFLAGS="-f elf"
                   ;;
             esac
-            AC_SUBST(NASMFLAGS)
+	    case "$target" in
+		    *-*-openbsd*)
+		      NASMFLAGS="-f aoutb"
+		      ;;
+	    esac
+	    	AC_SUBST(NASMFLAGS)
             CFLAGS="$CFLAGS -I\$(top_srcdir)/src/hermes"
             SDL_EXTRADIRS="$SDL_EXTRADIRS hermes"
             SDL_EXTRALIBS="$SDL_EXTRALIBS hermes/libhermes.la"
@@ -1681,6 +1686,7 @@ case "$target" in
         if test x$enable_joystick = xyes; then
             JOYSTICK_SUBDIRS="$JOYSTICK_SUBDIRS bsd"
             JOYSTICK_DRIVERS="$JOYSTICK_DRIVERS bsd/libjoystick_bsd.la"
+	    SYSTEM_LIBS="$SYSTEM_LIBS -lusbhid"
         fi
         # Set up files for the cdrom library
         if test x$enable_cdrom = xyes; then
@@ -2355,7 +2361,10 @@ fi
 if test $ARCH = solaris; then
   SDL_RLD_FLAGS="-R\${exec_prefix}/lib"
 fi
-if test $ARCH = openbsd -o $ARCH = bsdi; then
+if test $ARCH = openbsd -a x$enable_video_x11 = xyes; then
+  SDL_RLD_FLAGS="-L${X11BASE}/lib"
+fi
+if test $ARCH = bsdi; then
     SHARED_SYSTEM_LIBS="$SYSTEM_LIBS"
 else
     SHARED_SYSTEM_LIBS=""
@@ -2363,7 +2372,7 @@ fi
 STATIC_SYSTEM_LIBS="$SYSTEM_LIBS"
 
 dnl Output the video drivers we use
-if test x$enable_video = xtrue; then
+if test x$enable_video = xyes; then
     if test "$VIDEO_SUBDIRS" = ""; then
         AC_MSG_ERROR(*** No video drivers are enabled!)
     fi
