--- acinclude.m4.orig Sat Nov 19 11:50:27 2011 +++ acinclude.m4 Sun Apr 29 00:25:46 2012 @@ -284,6 +284,38 @@ fi dnl ----------------------------------------------------------------------- +dnl TC_CHECK_SNDIO([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) +dnl Test for sndio headers +dnl +AC_DEFUN([TC_CHECK_SNDIO], +[ +AC_MSG_CHECKING([whether sndio support is requested]) +AC_ARG_ENABLE(sndio, + AC_HELP_STRING([--enable-sndio], + [enable sndio support (no)]), + [case "${enableval}" in + yes) ;; + no) ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-sndio) ;; + esac], + [enable_sndio=no]) +AC_MSG_RESULT($enable_sndio) + +have_sndio="no" +if test x"$enable_sndio" = x"yes" ; then + AC_CHECK_HEADERS([sndio.h], [have_sndio="yes"]) + + if test x"$have_sndio" = x"yes" ; then + have_sndio="yes" + ifelse([$1], , :, [$1]) + else + AC_MSG_ERROR([sndio is requested, but cannot find headers]) + fi +fi +]) + +dnl ----------------------------------------------------------------------- + dnl TC_CHECK_OSS([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]) dnl Test for OSS headers dnl