From ab486f165b882aa5b02d0b48d6fa242a2d3c10da Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Tue, 2 Nov 2021 11:58:22 +0100 Subject: meson.build: Allow to disable OSS again If sys/soundcard.h is available, it is currently not possible to disable OSS with the --disable-oss or --without-default-features configure switches. Improve the check in meson.build to fix this. Fixes: 87430d5b13 ("configure, meson: move audio driver detection to Meson") Signed-off-by: Thomas Huth Message-Id: <20211102105822.773131-1-thuth@redhat.com> Signed-off-by: Paolo Bonzini --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 85f1e43dfe..0ab9c43bf2 100644 --- a/meson.build +++ b/meson.build @@ -911,7 +911,7 @@ if liblzfse.found() and not cc.links(''' endif oss = not_found -if not get_option('oss').auto() or have_system +if have_system and not get_option('oss').disabled() if not cc.has_header('sys/soundcard.h') # not found elif targetos == 'netbsd' -- cgit v1.2.3 From 78cb330e91a9cb996b7e8f61a184a433f680bc78 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 2 Nov 2021 12:23:45 +0100 Subject: meson: remove pointless warnings Meson tests sometimes warn if the required libraries and headers are present but a test program fails to link. In the case of DirectSound and OSS, however, there is no test program so there is no need to warn. Reported-by: Peter Maydell Signed-off-by: Paolo Bonzini --- meson.build | 4 ---- 1 file changed, 4 deletions(-) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 0ab9c43bf2..d09e314e04 100644 --- a/meson.build +++ b/meson.build @@ -924,8 +924,6 @@ if have_system and not get_option('oss').disabled() if not oss.found() if get_option('oss').enabled() error('OSS not found') - else - warning('OSS not found, disabling') endif endif endif @@ -938,8 +936,6 @@ if not get_option('dsound').auto() or (targetos == 'windows' and have_system) if not dsound.found() if get_option('dsound').enabled() error('DirectSound not found') - else - warning('DirectSound not found, disabling') endif endif endif -- cgit v1.2.3 From 6ed3e1482b4e373195bea36bbeba59d6fe76a999 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 2 Nov 2021 12:24:39 +0100 Subject: meson: remove unnecessary coreaudio test program AudioGetCurrentHostTime has been present forever, so the test is not enforcing a specific version of macOS. In fact the test was broken since it was not linking against the coreaudio dependency; just remove it. Fixes: 87430d5b13 ("configure, meson: move audio driver detection to Meson", 2021-10-14) Reported-by: Peter Maydell Signed-off-by: Paolo Bonzini --- meson.build | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'meson.build') diff --git a/meson.build b/meson.build index d09e314e04..30b06b12b4 100644 --- a/meson.build +++ b/meson.build @@ -944,22 +944,6 @@ coreaudio = not_found if not get_option('coreaudio').auto() or (targetos == 'darwin' and have_system) coreaudio = dependency('appleframeworks', modules: 'CoreAudio', required: get_option('coreaudio')) - if coreaudio.found() and not cc.links(''' - #include - int main(void) - { - return (int)AudioGetCurrentHostTime(); - }''') - coreaudio = not_found - endif - - if not coreaudio.found() - if get_option('coreaudio').enabled() - error('CoreAudio not found') - else - warning('CoreAudio not found, disabling') - endif - endif endif opengl = not_found -- cgit v1.2.3 From eea9453a016b622f74898809f53e0ca85961cd80 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Thu, 28 Oct 2021 20:59:08 +0200 Subject: Move the l2tpv3 test from configure to meson.build And while we're at it, also provide a proper entry for this feature in meson_options.txt, so that people who don't need it have a knob to disable this feature. Signed-off-by: Thomas Huth Message-Id: <20211028185910.1729744-3-thuth@redhat.com> Signed-off-by: Paolo Bonzini --- meson.build | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 30b06b12b4..e330438270 100644 --- a/meson.build +++ b/meson.build @@ -1658,6 +1658,13 @@ config_host_data.set('HAVE_MLOCKALL', cc.links(gnu_source_prefix + ''' return mlockall(MCL_FUTURE); }''')) +have_l2tpv3 = false +if not get_option('l2tpv3').disabled() and have_system + have_l2tpv3 = (cc.has_header_symbol('sys/socket.h', 'struct mmsghdr') + and cc.has_header('linux/ip.h')) +endif +config_host_data.set('CONFIG_L2TPV3', have_l2tpv3) + have_netmap = false if not get_option('netmap').disabled() and have_system have_netmap = cc.compiles(''' @@ -3377,6 +3384,7 @@ summary_info += {'JACK support': jack} summary_info += {'brlapi support': brlapi} summary_info += {'vde support': vde} summary_info += {'netmap support': have_netmap} +summary_info += {'l2tpv3 support': have_l2tpv3} summary_info += {'Linux AIO support': libaio} summary_info += {'Linux io_uring support': linux_io_uring} summary_info += {'ATTR/XATTR support': libattr} -- cgit v1.2.3