mirror of
https://github.com/qemu/qemu.git
synced 2025-08-16 14:54:29 +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
|
endif
|
||||||
|
|
||||||
iconv = not_found
|
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',
|
libiconv = cc.find_library('iconv',
|
||||||
required: false,
|
required: false,
|
||||||
static: enable_static)
|
static: enable_static)
|
||||||
@ -467,13 +469,11 @@ if not get_option('iconv').disabled()
|
|||||||
}''', dependencies: [libiconv])
|
}''', dependencies: [libiconv])
|
||||||
iconv = declare_dependency(dependencies: [libiconv])
|
iconv = declare_dependency(dependencies: [libiconv])
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
if get_option('iconv').enabled() and not iconv.found()
|
if get_option('iconv').enabled() and not iconv.found()
|
||||||
error('Cannot detect iconv API')
|
error('Cannot detect iconv API')
|
||||||
endif
|
endif
|
||||||
|
if iconv.found()
|
||||||
curses = not_found
|
|
||||||
if iconv.found() and not get_option('curses').disabled()
|
|
||||||
curses_libname_list = ['ncursesw', 'ncurses', 'cursesw', 'pdcurses']
|
curses_libname_list = ['ncursesw', 'ncurses', 'cursesw', 'pdcurses']
|
||||||
curses_test = '''
|
curses_test = '''
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
@ -511,12 +511,17 @@ if iconv.found() and not get_option('curses').disabled()
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
endif
|
endif
|
||||||
if get_option('curses').enabled() and not curses.found()
|
if not curses.found()
|
||||||
if not iconv.found()
|
if iconv.found()
|
||||||
error('Cannot detect iconv API')
|
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
|
else
|
||||||
error('Cannot detect curses API')
|
warning('iconv required for curses UI but not available, disabling')
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user