mirror of https://github.com/xemu-project/xemu.git
configure, meson: Migrate libpcap check to meson
This commit is contained in:
parent
ed042c141f
commit
ef44344d06
|
@ -1562,20 +1562,6 @@ if test "$opengl" != "no" ; then
|
|||
QEMU_CFLAGS="$QEMU_CFLAGS $opengl_cflags"
|
||||
fi # test "$opengl" != "no"
|
||||
|
||||
##########################################
|
||||
# libpcap probe
|
||||
if test "$mingw32" = "yes"; then
|
||||
libpcap_cflags="-I$source_path/winpcap-loader/include"
|
||||
libpcap_libs="-lws2_32"
|
||||
else
|
||||
if $pkg_config --exists "libpcap"; then
|
||||
libpcap_cflags=$($pkg_config --cflags libpcap)
|
||||
libpcap_libs=$($pkg_config --libs libpcap)
|
||||
else
|
||||
feature_not_found "libpcap" "Install libpcap"
|
||||
fi
|
||||
fi
|
||||
|
||||
##########################################
|
||||
# libsamplerate probe
|
||||
if $pkg_config --exists samplerate; then
|
||||
|
@ -2426,9 +2412,6 @@ if test "$have_tsan" = "yes" && test "$have_tsan_iface_fiber" = "yes" ; then
|
|||
echo "CONFIG_TSAN=y" >> $config_host_mak
|
||||
fi
|
||||
|
||||
echo "LIBPCAP_CFLAGS=$libpcap_cflags" >> $config_host_mak
|
||||
echo "LIBPCAP_LIBS=$libpcap_libs" >> $config_host_mak
|
||||
|
||||
echo "LIBSAMPLERATE_CFLAGS=$libsamplerate_cflags" >> $config_host_mak
|
||||
echo "LIBSAMPLERATE_LIBS=$libsamplerate_libs" >> $config_host_mak
|
||||
|
||||
|
|
11
meson.build
11
meson.build
|
@ -1186,8 +1186,15 @@ openssl = dependency('openssl',
|
|||
required: true,
|
||||
kwargs: static_kwargs)
|
||||
|
||||
libpcap = declare_dependency(compile_args: config_host['LIBPCAP_CFLAGS'].split(),
|
||||
link_args: config_host['LIBPCAP_LIBS'].split())
|
||||
if targetos == 'windows'
|
||||
libpcap = declare_dependency(include_directories: 'winpcap-loader/include',
|
||||
link_args: ['-lws2_32'])
|
||||
else
|
||||
libpcap = dependency('libpcap',
|
||||
method: 'pkg-config',
|
||||
required: true,
|
||||
kwargs: static_kwargs)
|
||||
endif
|
||||
|
||||
libsamplerate = declare_dependency(compile_args: config_host['LIBSAMPLERATE_CFLAGS'].split(),
|
||||
link_args: config_host['LIBSAMPLERATE_LIBS'].split())
|
||||
|
|
Loading…
Reference in New Issue