From ca34f3250bd5ac020117571805b9794adf3feec3 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 21 Jan 2019 11:06:44 +0100 Subject: [PATCH] input/CdioParanoia: detect libcdio version at compile time libcdio_paranoia was split from libcdio in version 90, and at the same time, the header was moved from cdio/paranoia.h to cdio/paranoia/paranoia.h. We can easily detect this version at compile time which is faster than configure time. --- src/input/plugins/CdioParanoiaInputPlugin.cxx | 3 ++- src/input/plugins/meson.build | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/input/plugins/CdioParanoiaInputPlugin.cxx b/src/input/plugins/CdioParanoiaInputPlugin.cxx index 93fe19e47..8ec972134 100644 --- a/src/input/plugins/CdioParanoiaInputPlugin.cxx +++ b/src/input/plugins/CdioParanoiaInputPlugin.cxx @@ -41,7 +41,8 @@ #include #include -#ifdef HAVE_CDIO_PARANOIA_PARANOIA_H +#include +#if LIBCDIO_VERSION_NUM >= 90 #include #else #include diff --git a/src/input/plugins/meson.build b/src/input/plugins/meson.build index 176c24401..5fc2f122b 100644 --- a/src/input/plugins/meson.build +++ b/src/input/plugins/meson.build @@ -10,10 +10,6 @@ libcdio_paranoia_dep = dependency('libcdio_paranoia', version: '>= 0.4', require conf.set('ENABLE_CDIO_PARANOIA', libcdio_paranoia_dep.found()) if libcdio_paranoia_dep.found() input_plugins_sources += 'CdioParanoiaInputPlugin.cxx' - - conf.set('HAVE_CDIO_PARANOIA_PARANOIA_H', - compiler.has_header('cdio/paranoia/paranoia.h', - dependencies: libcdio_paranoia_dep)) endif if curl_dep.found()