Skip to content

Commit

Permalink
Use jmarsh's direct test of CoreMIDI compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
krcroft committed Oct 27, 2019
1 parent 19bbe50 commit 135c9d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
13 changes: 5 additions & 8 deletions configure.ac
Expand Up @@ -189,15 +189,12 @@ CXXFLAGS="$CXXFLAGS -mno-ms-bitfields"
],[AC_MSG_RESULT([no])])
CFLAGS="$BACKUP_CFLAGS"

AC_MSG_CHECKING(if compiler suports Apple's __has_extension(blocks) required by CoreMIDI)
AC_MSG_CHECKING(if compiler supports CoreMIDI headers)
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
#ifndef __has_extension
#define __has_extension __has_feature /* Compatibility with pre-3.0 compilers. */
#endif
#if __has_extension(blocks)
#endif
]])], [AC_MSG_RESULT(yes);AC_DEFINE([C_SUPPORTS_APPLE_BLOCKS], [],
[compiler suports Apple's __has_extension(blocks)])], AC_MSG_RESULT(no))
#include <CoreMIDI/MIDIServices.h>
int main(int argc, char** argv) { return 0; }
]])], [AC_MSG_RESULT(yes);AC_DEFINE([C_SUPPORTS_COREMIDI], [],
[compiler supports CoreMIDI headers])], AC_MSG_RESULT(no))

dnl enable disable alsa and pass it's cflags to CXXFLAGS
AC_ARG_ENABLE(alsa-midi,
Expand Down
2 changes: 1 addition & 1 deletion src/gui/midi.cpp
Expand Up @@ -68,7 +68,7 @@ MidiHandler::MidiHandler(){

MidiHandler Midi_none;

#if defined(MACOSX) && defined(C_SUPPORTS_APPLE_BLOCKS)
#if defined(MACOSX) && defined(C_SUPPORTS_COREMIDI)

#include "midi_coremidi.h"
#include "midi_coreaudio.h"
Expand Down

0 comments on commit 135c9d2

Please sign in to comment.