configure, meson: Migrate libsamplerate check to meson

This commit is contained in:
Matt Borgerson 2023-01-23 00:30:40 -07:00
parent ef44344d06
commit ec7d5ce8db
2 changed files with 4 additions and 14 deletions

12
configure vendored
View File

@ -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

View File

@ -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