view m4/amidi-plug.m4 @ 952:87666f9bf6d0 trunk

[svn] Upstream commit "Vastly enhanced generic Protracker player and modified loaders accordingly. Copl now supports a getchip() method. A2M loader enhanced for OPL3 features." manually applied by decoding the actual changes from an ocean of whitespace damage. It compiles, but do test it.
author chainsaw
date Fri, 13 Apr 2007 09:09:50 -0700
parents 13389e613d67
children
line wrap: on
line source

# Checks for amidi-plug

dnl AM_PATH_AMIDIPLUG_HWSYNTH([ACTION-IF-FOUND , ACTION-IF-NOT-FOUND])
dnl Test for ALSA-supported hardware synth
dnl
AC_DEFUN([AM_PATH_AMIDIPLUG_HWSYNTH],
[

AMIDIPLUG_EVERYTHINGOK="yes"

dnl **** Search for a hardware synth (ALSA managed)  ****
AC_CHECK_FILE([/proc/asound/card0/wavetableD1],
  [ap_hwsynth_found=yes], [ap_hwsynth_found=no])
if test "x$ap_hwsynth_found" = "xno"; then
  AC_CHECK_FILE([/proc/asound/card1/wavetableD1],
    [ap_hwsynth_found=yes], [ap_hwsynth_found=no])
  if test "x$ap_hwsynth_found" = "xno"; then
    AC_CHECK_FILE([/proc/asound/card2/wavetableD1],
      [ap_hwsynth_found=yes], [ap_hwsynth_found=no])
    if test "x$ap_hwsynth_found" = "xno"; then
      AMIDIPLUG_EVERYTHINGOK="no"
      AC_MSG_WARN([*** Could not find an ALSA-supported hardware synth, amidi-plug won't be compiled. If you wish to compile it anyway, use --enable-amidiplug in configure. ***])
    fi
  fi
fi

if test "x$AMIDIPLUG_EVERYTHINGOK" = "xyes"; then
  ifelse([$1], , :, [$1])
else
  ifelse([$2], , :, [$2])
fi

])