diff --git a/configure b/configure index 11d69ca2f3..a4ea9d7f8a 100755 --- a/configure +++ b/configure @@ -1562,15 +1562,6 @@ if test "$opengl" != "no" ; then QEMU_CFLAGS="$QEMU_CFLAGS $opengl_cflags" fi # test "$opengl" != "no" -########################################## -# libsamplerate probe -if $pkg_config --exists samplerate; then - libsamplerate_cflags=$($pkg_config --cflags samplerate) - libsamplerate_libs=$($pkg_config --libs samplerate) -else - feature_not_found "samplerate" "Install libsamplerate0-dev" -fi - # check and set a backend for coroutine # We prefer ucontext, but it's not always possible. The fallback @@ -2412,9 +2403,6 @@ if test "$have_tsan" = "yes" && test "$have_tsan_iface_fiber" = "yes" ; then echo "CONFIG_TSAN=y" >> $config_host_mak fi -echo "LIBSAMPLERATE_CFLAGS=$libsamplerate_cflags" >> $config_host_mak -echo "LIBSAMPLERATE_LIBS=$libsamplerate_libs" >> $config_host_mak - if test "$plugins" = "yes" ; then echo "CONFIG_PLUGIN=y" >> $config_host_mak fi diff --git a/meson.build b/meson.build index 114eee4da7..7c7fffd187 100644 --- a/meson.build +++ b/meson.build @@ -1196,8 +1196,10 @@ else kwargs: static_kwargs) endif -libsamplerate = declare_dependency(compile_args: config_host['LIBSAMPLERATE_CFLAGS'].split(), - link_args: config_host['LIBSAMPLERATE_LIBS'].split()) +libsamplerate = dependency('samplerate', + method: 'pkg-config', + required: true, + kwargs: static_kwargs) gnutls = not_found gnutls_crypto = not_found