mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-10-07 03:29:37 +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
29
meson.build
29
meson.build
|
@ -455,7 +455,9 @@ if targetos == 'linux' and have_tools and not get_option('mpath').disabled()
|
|||
endif
|
||||
|
||||
iconv = not_found
|
||||
if not get_option('iconv').disabled()
|
||||
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,
|
||||
static: enable_static)
|
||||
|
@ -467,13 +469,11 @@ if not get_option('iconv').disabled()
|
|||
}''', dependencies: [libiconv])
|
||||
iconv = declare_dependency(dependencies: [libiconv])
|
||||
endif
|
||||
endif
|
||||
if get_option('iconv').enabled() and not iconv.found()
|
||||
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()
|
||||
endif
|
||||
if iconv.found()
|
||||
curses_libname_list = ['ncursesw', 'ncurses', 'cursesw', 'pdcurses']
|
||||
curses_test = '''
|
||||
#include <locale.h>
|
||||
|
@ -511,12 +511,17 @@ if iconv.found() and not get_option('curses').disabled()
|
|||
endif
|
||||
endif
|
||||
endforeach
|
||||
endif
|
||||
if get_option('curses').enabled() and not curses.found()
|
||||
if not iconv.found()
|
||||
error('Cannot detect iconv API')
|
||||
endif
|
||||
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