# HG changeset patch # User Matti Hamalainen # Date 1221715189 -10800 # Node ID 8c48d6793b86f7524a2e4d1509862baee51d67c4 # Parent 581bec6e2d33e0a20b09ad3a48192f957820190b Improve detection of MIDI-enabled alsalib, hopefully. diff -r 581bec6e2d33 -r 8c48d6793b86 configure.ac --- a/configure.ac Fri Aug 29 02:14:51 2008 +0300 +++ b/configure.ac Thu Sep 18 08:19:49 2008 +0300 @@ -1024,20 +1024,10 @@ ) if test "x$enable_alsa" = "xyes"; then - PKG_CHECK_MODULES(ALSA, [alsa >= 1.0], -[ -have_alsa=yes -alsalib_available=yes -], -[ -have_alsa=no -alsalib_available=no -] - ) + PKG_CHECK_MODULES([ALSA], [alsa >= 1.0], [have_alsa=yes], [have_alsa=no]) else AC_MSG_RESULT([*** ALSA output plugin disabled per user request ***]) have_alsa=no - alsalib_available=check fi if test "x$have_alsa" = "xyes"; then @@ -1085,13 +1075,17 @@ fi fi +if test "x$have_alsa" = "xyes"; then + AUD_TRY_COMPILE([ALSA MIDI support], [alsalib_hasmidi], +[#include ], +[snd_seq_t *seq = NULL;], + [alsalib_midi=yes], [alsalib_midi=no]) +fi + + if test "x$enable_amidiplug" = "xcheck"; then - if test "x$alsalib_available" = "xcheck"; then - PKG_CHECK_MODULES(ALSA, [alsa >= 1.0], - [alsalib_available=yes],[alsalib_available=no]) - fi - if test "x$alsalib_available" = "xyes"; then - AM_PATH_AMIDIPLUG_HWSYNTH(ap_have_hwsynth=yes, ap_have_hwsynth=no) + if test "x$alsalib_midi" = "xyes"; then + AM_PATH_AMIDIPLUG_HWSYNTH([ap_have_hwsynth=yes], [ap_have_hwsynth=no]) if test "x$ap_have_hwsynth" = "xyes"; then enable_amidiplug=yes ap_disable_timidity=yes @@ -1126,11 +1120,7 @@ AMIDIPLUG_BACKEND_DIR=amidi-plug AC_SUBST(AMIDIPLUG_BACKEND_DIR) if test "x$enable_amidiplug_alsa" = "xauto" -o "x$enable_amidiplug_alsa" = "xyes"; then - if test "x$alsalib_available" = "xcheck"; then - PKG_CHECK_MODULES(ALSA, [alsa >= 1.0], - [alsalib_available=yes],[alsalib_available=no]) - fi - if test "x$alsalib_available" = "xyes"; then + if test "x$alsalib_midi" = "xyes"; then AMIDIPLUG_BACKENDS="$AMIDIPLUG_BACKENDS backend-alsa" enable_amidiplug_alsa=yes else