Index: configure.ac
--- configure.ac.orig
+++ configure.ac
@@ -75,7 +75,19 @@ fi
 
 AM_CONDITIONAL(HAVE_OSS,test "$have_oss" = yes)
 
+dnl ================================================================
+dnl Check for sndio
+dnl ================================================================
+ 
+AC_CHECK_HEADER(sndio.h, have_sndio=yes, have_sndio=no)
+AM_CONDITIONAL(HAVE_SNDIO, test "$have_sndio" = yes)
+if test "$have_sndio" = yes; then
+   SNDIO_LIBS="-lsndio"
+   AC_DEFINE(HAVE_SNDIO,,[Define to enable sndio input module])
+fi
 
+AM_CONDITIONAL(HAVE_SNDIO,test "$have_sndio" = yes)
+
 dnl ================================================================
 dnl Check for Sun audio
 dnl ================================================================
@@ -187,6 +199,7 @@ XIPH_VAR_PREPEND([XIPH_LIBS], [$VORBISENC_LIBS $VORBIS
 dnl Make substitutions
 
 AC_SUBST(ALSA_LIBS)
+AC_SUBST(SNDIO_LIBS)
 AC_SUBST(ROARAUDIO_LIBS)
 AC_SUBST(ROARAUDIO_CFLAGS)
 AC_SUBST(XML_LIBS)
@@ -213,6 +226,7 @@ echo "
 
                 Build with alsa:           $have_alsa
                 Build with OSS:            $have_oss
+		Build with sndio:          $have_sndio
                 Build with Sun audio:      $have_sun_audio
                 Build with RoarAudio:      $have_roaraudio
 
