From 59c91ece11f4c3b5aa0f21398e6dcb441e7e0e52 Mon Sep 17 00:00:00 2001 From: =?utf8?q?IOhannes=20m=20zm=C3=B6lnig?= Date: Tue, 10 Oct 2017 14:28:37 +0200 Subject: [PATCH] Conditionally build asio sources afaict, the current code wouldn't work at all (defining an unused 'objects' Makefile-variable). --- Makefile.am | 8 ++++++++ configure.ac | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index d4fa538..94c8c49 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,6 +9,14 @@ lib_LTLIBRARIES = %D%/librtaudio.la %D%/RtAudio.cpp \ %D%/rtaudio_c.cpp +if ASIO +%C%_librtaudio_la_SOURCES += \ + asio.cpp \ + asiodrivers.cpp \ + asiolist.cpp \ + iasiothiscallresolver.cpp +endif + rtaudio_incdir = $(includedir)/rtaudio rtaudio_inc_HEADERS = \ %D%/RtAudio.h \ diff --git a/configure.ac b/configure.ac index b8ba18d..0bdec71 100644 --- a/configure.ac +++ b/configure.ac @@ -32,6 +32,8 @@ AC_SUBST(req) api="" req="" +use_asio="" + # configure flags AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug],[enable various debug output])]) @@ -235,7 +237,7 @@ AS_CASE([$host], AS_IF([test "x$with_asio" = "xyes" ], [ AC_MSG_RESULT(using ASIO) api="$api -D__WINDOWS_ASIO__" - AC_SUBST( objects, ["asio.o asiodrivers.o asiolist.o iasiothiscallresolver.o"] ) + use_asio=yes ]) # Look for DirectSound flag AS_IF([test "x$with_ds" = "xyes" ], [ @@ -262,6 +264,8 @@ AS_CASE([$host], ] ) +AM_CONDITIONAL( ASIO, [test "x${use_asio}" = "xyes" ]) + CPPFLAGS="$CPPFLAGS $api" AC_OUTPUT -- 2.30.2