$OpenBSD: patch-configure_ac,v 1.6 2012/08/25 13:15:23 ajacoutot Exp $
--- configure.ac.orig	Thu Aug 23 04:13:11 2012
+++ configure.ac	Fri Aug 24 07:59:24 2012
@@ -207,7 +207,7 @@ case "$target_os" in
   openbsd* )       OSTYPE=OpenBSD ;
 		   OS_TAG="P_OPENBSD" ;
                    OSRELEASE="`sysctl -n kern.osrevision`" ;
-		   ENDLDLIBS="-lossaudio" ;
+		   ENDLDLIBS="" ;
                    need_pragma=yes ;
 		   AC_DEFINE(P_PTHREADS, 1, "PThreads found")
 		   AC_CHECK_FUNC([swab], [AC_DEFINE([USE_SYSTEM_SWAB], [], [Use system swab()] )] )
@@ -314,8 +314,12 @@ case "$target_cpu" in
         LIB64=1
 	;;
 
-   sparc | sparc64 )
+   sparc )
 	MACHTYPE=sparc
+	;;
+
+   sparc64 )
+	MACHTYPE=sparc
 	P_64BIT=1
         LIB64=1
 	;;
@@ -1285,7 +1289,8 @@ else
   if test $HAS_IPV6 = no ; then
     AC_MSG_RESULT(no)
   else
-    AC_TRY_COMPILE([#include <sys/socket.h>
+    AC_TRY_COMPILE([#include <sys/types.h>
+                     #include <sys/socket.h>
                      #include <netdb.h>],
                      [getnameinfo(0, 0, 0, 0, 0, 0, 0);], HAS_IPV6=yes, HAS_IPV6=no)
     if test $HAS_IPV6 = no ; then
@@ -1577,7 +1582,7 @@ dnl ##################################################
 dnl check for video capture support.
 dnl videodev.h on linux
 dnl machine/ioctl_meteor on FreeBSD
-dnl i386/ioctl_meteor on OpenBSD
+dnl dev/ic/bt8xx (bktr) and sys/videoio (v4l2) on OpenBSD
 dnl dev/ic/bt8xx on NetBSD
 
 HAS_VIDEO_CAPTURE=
@@ -1623,6 +1628,7 @@ if test "x${HAS_AUDIO}" = "x1" ; then
   dnl these are needed to pass through to the plugin configure program
   AC_ARG_ENABLE(alsa,  [  --enable-alsa           enable ALSA audio support],enable_alsa=$enableval)
   AC_ARG_ENABLE(oss,   [  --enable-oss            enable OSS audio support],enable_oss=$enableval)
+  AC_ARG_ENABLE(sndio,[  --enable-sndio          enable sndio audio support],enable_sndio=$enableval)
   AC_ARG_ENABLE(pulse, [  --enable-pulse          enable PULSE audio support],enable_pulse=$enableval)
 fi
 
