$OpenBSD: patch-configure_in,v 1.2 2012/08/22 20:14:06 naddy Exp $
--- configure.in.orig	Thu May 22 10:47:36 2008
+++ configure.in	Mon Aug 20 17:50:01 2012
@@ -17,6 +17,10 @@ AC_ARG_WITH(alsa, 
             [  --with-alsa (default=yes)],
             with_alsa=$withval, with_alsa="yes")
 
+AC_ARG_WITH(sndio, 
+            [  --with-sndio (default=yes)],
+            with_sndio=$withval, with_sndio="yes")
+
 AC_ARG_WITH(jack, 
             [  --with-jack (default=yes)],
             with_jack=$withval, with_jack="yes")
@@ -88,6 +92,7 @@ dnl checks for various host APIs and arguments to conf
 dnl turn them on or off
 
 AC_CHECK_LIB(asound, snd_pcm_open, have_alsa=yes, have_alsa=no)
+AC_CHECK_LIB(sndio, sio_initpar, have_sndio=yes, have_sndio=no)
 AC_CHECK_LIB(hpi, HPI_SubSysCreate, have_asihpi=yes, have_asihpi=no, -lm)
 AC_CHECK_LIB(ossaudio, _oss_ioctl, have_libossaudio=yes, have_libossaudio=no)
 
@@ -303,6 +308,13 @@ case "${host_os}" in
            LIBS="$LIBS -lasound"
            OTHER_OBJS="$OTHER_OBJS src/hostapi/alsa/pa_linux_alsa.o"
            AC_DEFINE(PA_USE_ALSA)
+        fi
+
+        if [[ "$have_sndio" = "yes" -a "$with_sndio" != "no" ]] ; then
+           DLL_LIBS="$DLL_LIBS -lsndio"
+           LIBS="$LIBS -lsndio"
+           OTHER_OBJS="$OTHER_OBJS src/hostapi/sndio/pa_sndio.o"
+           AC_DEFINE(PA_USE_SNDIO)
         fi
 
         if [[ $have_jack = "yes" ] && [ $with_jack != "no" ]] ; then
