mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-07-23 19:34:41 +00:00
meson: cleanup curses/iconv test
Skip the test if it is system emulation is not requested, and differentiate errors for lack of iconv and lack of curses. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
ac0c8351ab
commit
30fe76b17c
19
meson.build
19
meson.build
|
@ -455,6 +455,8 @@ if targetos == 'linux' and have_tools and not get_option('mpath').disabled()
|
|||
endif
|
||||
|
||||
iconv = not_found
|
||||
curses = not_found
|
||||
if have_system and not get_option('curses').disabled()
|
||||
if not get_option('iconv').disabled()
|
||||
libiconv = cc.find_library('iconv',
|
||||
required: false,
|
||||
|
@ -471,9 +473,7 @@ endif
|
|||
if get_option('iconv').enabled() and not iconv.found()
|
||||
error('Cannot detect iconv API')
|
||||
endif
|
||||
|
||||
curses = not_found
|
||||
if iconv.found() and not get_option('curses').disabled()
|
||||
if iconv.found()
|
||||
curses_libname_list = ['ncursesw', 'ncurses', 'cursesw', 'pdcurses']
|
||||
curses_test = '''
|
||||
#include <locale.h>
|
||||
|
@ -512,11 +512,16 @@ if iconv.found() and not get_option('curses').disabled()
|
|||
endif
|
||||
endforeach
|
||||
endif
|
||||
if get_option('curses').enabled() and not curses.found()
|
||||
if not iconv.found()
|
||||
error('Cannot detect iconv API')
|
||||
if not curses.found()
|
||||
if iconv.found()
|
||||
if get_option('curses').enabled()
|
||||
error('Cannot find curses')
|
||||
endif
|
||||
elif get_option('curses').enabled()
|
||||
error('iconv required for curses UI but not available')
|
||||
else
|
||||
error('Cannot detect curses API')
|
||||
warning('iconv required for curses UI but not available, disabling')
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
|
Loading…
Reference in a new issue