From c402496916fc80b595e015b532f121c601440e08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 23 May 2017 09:57:28 +0100 Subject: [PATCH] Require wildmidi >= 0.4 https://bugzilla.gnome.org/show_bug.cgi?id=768576 --- configure.ac | 23 +++++++++++++++-------- meson.build | 1 - 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/configure.ac b/configure.ac index 151026fc3e..17896d5880 100644 --- a/configure.ac +++ b/configure.ac @@ -3032,16 +3032,23 @@ AG_GST_CHECK_FEATURE(WILDMIDI, [wildmidi midi soft synth plugin], wildmidi, [ WildMidi_Init, , wildmidi_lib.h, WILDMIDI_LIBS="-lWildMidi") - AC_CHECK_LIB(WildMidi, WildMidi_LoadSamples, AC_DEFINE(HAVE_WILDMIDI_0_2_2, [1], [Have WildMidi 0.2.2 or earlier library])) - + WILDMIDI_CFLAGS= + WILDMIDI_LIBS= if test "x$HAVE_WILDMIDI" = "xyes"; then - WILDMIDI_CFLAGS= - WILDMIDI_LIBS=-lWildMidi - AC_MSG_NOTICE(compiling gstWildMidi) + AC_MSG_CHECKING([for wildmidi >= 4.0]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ + #if LIBWILDMIDI_VER_MAJOR == 0 && LIBWILDMIDI_VER_MINOR < 4 + #error "wildmidi too old" + #endif + ]])], [ AC_MSG_RESULT(yes) + HAVE_WILDMIDI="yes" + WILDMIDI_CFLAGS= + WILDMIDI_LIBS=-lWildMidi + ], [ AC_MSG_RESULT(no) + HAVE_WILDMIDI="no" + ]) else - WILDMIDI_CFLAGS= - WILDMIDI_LIBS= - AC_MSG_WARN(no WildMidi library found (libWildMidi)) + AC_MSG_WARN([WildMidi library or development headers not found]) fi AC_SUBST(WILDMIDI_CFLAGS) AC_SUBST(WILDMIDI_LIBS) diff --git a/meson.build b/meson.build index c2244e0620..b057a7fc70 100644 --- a/meson.build +++ b/meson.build @@ -223,7 +223,6 @@ check_functions = [ # check token HAVE_WAYLAND # check token HAVE_WEBP # check token HAVE_WILDMIDI -# check token HAVE_WILDMIDI_0_2_2 # check token HAVE_WIN32 # check token HAVE_WININET # check token HAVE_WINKS