$OpenBSD: patch-configure_ac,v 1.5 2010/12/27 12:08:21 shadchin Exp $
--- configure.ac.orig	Tue Dec  7 18:14:55 2010
+++ configure.ac	Sat Dec 25 23:56:42 2010
@@ -793,13 +793,21 @@ AC_ARG_ENABLE( jack,
                 [enable_jack="yes"])
 
 if test "x$enable_jack" = "xyes"; then
-        AM_PATH_JACK(have_jack=yes, have_jack=no)
+	PKG_CHECK_MODULES(JACK, jack >= 0.109.10, , [AC_MSG_WARN(
+	[*** Cannot find jack 0.109.10 or newer, jack will not be built ***])
+	enable_jack=no])
 else
         AC_MSG_RESULT([*** jack plugin disabled per user request ***])
-        have_jack=no
+        enable_jack=no
 fi
 
-if test "x$have_jack" = "xyes"; then
+if test "x$enable_jack" = xyes; then
+       PKG_CHECK_MODULES(SAMPLERATE, samplerate >= 0.0.15, , [AC_MSG_WARN(
+       [Could not find libsamplerate, necessary for jack output plugin.])
+       enable_jack=no])
+fi
+
+if test "x$enable_jack" = xyes; then
 	OUTPUT_PLUGINS="$OUTPUT_PLUGINS jack"
 fi
 
@@ -1178,7 +1186,7 @@ have_solaris=no
 have_sun=no
 ARCH_DEFINES=""
 case "$host" in
-    *-*-openbsd* | *-*-netbsd* | *-*-mirbsd*)
+    *-*-netbsd* | *-*-mirbsd*)
         have_sun=yes
         if test "${is_elf}" = "no"
         then
@@ -1186,6 +1194,12 @@ case "$host" in
         fi
         OUTPUT_PLUGINS="$OUTPUT_PLUGINS sun"
     ;;
+    *-*-openbsd*)
+        if test "${is_elf}" = "no"
+        then
+            AC_DEFINE(SYMBOL_PREFIX, "_", [Define to symbol prefix, if any])
+        fi
+    ;;
     *-*-darwin*)
         AC_DEFINE(SYMBOL_PREFIX, "_", [Define to symbol prefix, if any])
     ;;
@@ -1524,6 +1538,20 @@ if test "x$enable_resample" = "xyes"; then
 	EFFECT_PLUGINS="$EFFECT_PLUGINS resample"
 fi
 
+dnl *** sndio
+
+AC_ARG_ENABLE(sndio,
+    [  --enable-sndio          enable sndio output plugin (default=disabled) ],
+    [have_sndio=$enableval],
+    [have_sndio=no]
+)
+
+if test "x$have_sndio" = "xyes"; then
+	OUTPUT_PLUGINS="$OUTPUT_PLUGINS sndio"
+else
+	have_sndio=no
+fi
+
 dnl *** End of all plugin checks ***
 
 AC_SUBST(ARCH_DEFINES)
@@ -1619,6 +1647,7 @@ echo "    -> FileWriter MP3 output part:        $have_
 echo "    -> FileWriter Vorbis output part:     $have_vorbisenc"
 echo "    -> FileWriter FLAC output part:       $have_writer_flac"
 echo "  Null Audio output (null):               yes"
+echo "  Sndio Audio output (sndio):             $have_sndio"
 echo
 echo "  Input Plugins"
 echo "  -------------"
