meson: remove unnecessary coreaudio test program
PATCH 1/1 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.
--- meson.build | 16 ---------------- 1 file changed, 16 deletions(-)
meson.build +0 -16
@@ -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 <CoreAudio/CoreAudio.h> - 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
Signature · 1 line
2.31.1
Quoted 27 lines · Paolo Bonzini
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 <[email protected]>Signed-off-by Paolo Bonzini <[email protected]>--- meson.build | 16 ---------------- 1 file changed, 16 deletions(-)meson.build +0
-7@@ -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 <CoreAudio/CoreAudio.h> - int main(void) - { - return (int)AudioGetCurrentHostTime(); - }''') - coreaudio = not_found
meson.build coreaudio = not_found · line 947
Quoted 10 lines
meson.build +0
-9- endif - - if not coreaudio.found() - if get_option('coreaudio').enabled() - error('CoreAudio not found') - else - warning('CoreAudio not found, disabling') - endif - endif endif
Don't we still want
if not coreaudio.found()
if get_option('coreaudio').enabled()
error('CoreAudio not found')
endif
endif
?
-- PMM
Quoted 19 lines · Peter Maydell
Quoted 9 lines
coreaudio = dependency('appleframeworks', modules: 'CoreAudio',
required:get_option('coreaudio'))meson.build +0
-7- if coreaudio.found() and not cc.links(''' - #include <CoreAudio/CoreAudio.h> - int main(void) - { - return (int)AudioGetCurrentHostTime(); - }''') - coreaudio = not_foundmeson.build coreaudio = not_found · line 947
Quoted 10 lines
meson.build +0
-9- endif - - if not coreaudio.found() - if get_option('coreaudio').enabled() - error('CoreAudio not found') - else - warning('CoreAudio not found, disabling') - endif - endif endif
Quoted 7 lines
Don't we still want
if not
coreaudio.found()
if get_option('coreaudio').enabled()
error('CoreAudio not found')
endif
endif
No, the "required: get_option('coreaudio')" takes care of both forced enabling and forced disabling.
Paolo
Quoted 29 lines · Paolo Bonzini
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 <[email protected]>Signed-off-by Paolo Bonzini <[email protected]>--- meson.build | 16 ---------------- 1 file changed, 16 deletions(-)meson.build +0
-9@@ -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 <CoreAudio/CoreAudio.h> - int main(void) - { - return (int)AudioGetCurrentHostTime(); - }''') - coreaudio = not_found - endif -
meson.build coreaudio = not_found · line 949
Quoted 10 lines
meson.build +0
-7- 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