$OpenBSD: patch-configure_ac,v 1.1 2019/01/22 04:31:41 jsg Exp $

Index: configure.ac
--- configure.ac.orig
+++ configure.ac
@@ -196,6 +196,24 @@ if test x$alsa_midi = xtrue ; then 
   CXXFLAGS="$CXXFLAGS $ALSA_CFLAGS"
 fi
 
+dnl enable disable sndio and pass it's cflags to CXXFLAGS
+AH_TEMPLATE([HAVE_SNDIO],[Determines if sndio is available on the system.])
+AC_ARG_ENABLE(sndio-midi,
+AC_HELP_STRING([--enable-sndio-midi],[compile with sndio midi support (default yes)]),
+[ case "${enableval}" in
+ yes) sndio_midi=true;;
+ no)  sndio_midi=false;;
+esac],
+[sndio_midi=true])
+if test x$sndio_midi = xtrue ; then 
+  AC_CHECK_HEADER(sndio.h,have_sndio_h=yes,)
+  AC_CHECK_LIB(sndio, sio_initpar, have_sndio_lib=yes, , )
+  if test x$have_sndio_lib = xyes -a x$have_sndio_h = xyes ; then
+    LIBS="$LIBS -lsndio"
+    AC_DEFINE(HAVE_SNDIO,1)
+  fi
+fi
+
 #Check for big endian machine, should #define WORDS_BIGENDIAN if so
 AC_C_BIGENDIAN
 
