summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac9
-rw-r--r--src/Patchage.cpp4
-rw-r--r--src/PatchageFlowCanvas.cpp6
3 files changed, 11 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index dfb41f1..31199eb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -34,13 +34,12 @@ if test "$build_jack_midi" = "yes"; then
fi
# Check for ALSA
-enable_alsa="yes"
+build_alsa="yes"
AC_ARG_ENABLE(alsa,
[AS_HELP_STRING(--enable-alsa, [Enable Alsa MIDI driver (yes)])],
-[ enable_alsa="$enableval" ]
-)
+ [ if test x$enable_alsa = xno ; then build_alsa=no ; fi ])
-if test "$enable_alsa" = "yes"; then
+if test "$build_alsa" = "yes"; then
AC_CHECK_LIB(asound, snd_seq_open, ALSA_FOUND="yes", ALSA_FOUND="no", -lm -ldl -lpthread)
if test "$ALSA_FOUND" = "yes"; then
@@ -126,7 +125,7 @@ AC_MSG_RESULT([])
AC_MSG_RESULT([**********************************************************************])
AC_MSG_RESULT([Patchage build configuration:])
AC_MSG_RESULT([])
-AC_MSG_RESULT([Alsa support: $ALSA_FOUND])
+AC_MSG_RESULT([Alsa support: $build_alsa])
AC_MSG_RESULT([Lash support: $have_lash])
AC_MSG_RESULT([**********************************************************************])
AC_MSG_RESULT([])
diff --git a/src/Patchage.cpp b/src/Patchage.cpp
index b11b255..b7e00ef 100644
--- a/src/Patchage.cpp
+++ b/src/Patchage.cpp
@@ -22,12 +22,14 @@
#include <pthread.h>
#include "StateManager.h"
#include "PatchageFlowCanvas.h"
-#include "AlsaDriver.h"
#include "JackDriver.h"
#include "JackSettingsDialog.h"
#ifdef HAVE_LASH
#include "LashDriver.h"
#endif
+#ifdef HAVE_ALSA
+#include "AlsaDriver.h"
+#endif
// FIXME: include to avoid undefined reference to boost SP debug hooks stuff
#include <raul/SharedPtr.h>
diff --git a/src/PatchageFlowCanvas.cpp b/src/PatchageFlowCanvas.cpp
index 5cf4c35..f059442 100644
--- a/src/PatchageFlowCanvas.cpp
+++ b/src/PatchageFlowCanvas.cpp
@@ -14,13 +14,15 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+#include "config.h"
#include "PatchageFlowCanvas.h"
#include "Patchage.h"
#include "JackDriver.h"
-#include "AlsaDriver.h"
#include "PatchageModule.h"
#include "PatchagePort.h"
-
+#ifdef HAVE_ALSA
+#include "AlsaDriver.h"
+#endif
PatchageFlowCanvas::PatchageFlowCanvas(Patchage* app, int width, int height)
: FlowCanvas(width, height),