diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-10-15 21:53:05 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2016-10-28 11:19:38 +0200 |
commit | 8ddc5bf9e5de51c2a4842c01dd3a97f5591776fd (patch) | |
tree | c867df934cc6ab6c064e4a425c558dc1c8d9d15b /configure | |
parent | 697783a736b99e8666baf9a0f81fc483ac5f31a5 (diff) | |
download | qemu-8ddc5bf9e5de51c2a4842c01dd3a97f5591776fd.zip qemu-8ddc5bf9e5de51c2a4842c01dd3a97f5591776fd.tar.gz qemu-8ddc5bf9e5de51c2a4842c01dd3a97f5591776fd.tar.bz2 |
curses: Use cursesw instead of curses
Use ncursesw package instead of curses on non-mingw, and check a few
functions.
Also take cflags from pkg-config, since cursesw headers may be in a
separate, non-default directory.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Message-id: 20161015195308.20473-3-samuel.thibault@ens-lyon.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 29 |
1 files changed, 20 insertions, 9 deletions
@@ -2917,27 +2917,38 @@ fi # curses probe if test "$curses" != "no" ; then if test "$mingw32" = "yes" ; then - curses_list="$($pkg_config --libs ncurses 2>/dev/null):-lpdcurses" + curses_inc_list="$($pkg_config --cflags ncurses 2>/dev/null):" + curses_lib_list="$($pkg_config --libs ncurses 2>/dev/null):-lpdcurses" else - curses_list="$($pkg_config --libs ncurses 2>/dev/null):-lncurses:-lcurses" + curses_inc_list="$($pkg_config --cflags ncursesw 2>/dev/null):" + curses_lib_list="$($pkg_config --libs ncursesw 2>/dev/null):-lncursesw:-lcursesw" fi curses_found=no cat > $TMPC << EOF +#include <locale.h> #include <curses.h> +#include <wchar.h> int main(void) { const char *s = curses_version(); + wchar_t wch = L'w'; + setlocale(LC_ALL, ""); resize_term(0, 0); + addwstr(L"wide chars\n"); + addnwstr(&wch, 1); return s != 0; } EOF IFS=: - for curses_lib in $curses_list; do - unset IFS - if compile_prog "" "$curses_lib" ; then - curses_found=yes - libs_softmmu="$curses_lib $libs_softmmu" - break - fi + for curses_inc in $curses_inc_list; do + for curses_lib in $curses_lib_list; do + unset IFS + if compile_prog "$curses_inc" "$curses_lib" ; then + curses_found=yes + QEMU_CFLAGS="$curses_inc $QEMU_CFLAGS" + libs_softmmu="$curses_lib $libs_softmmu" + break + fi + done done unset IFS if test "$curses_found" = "yes" ; then |