mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
ui: better unicode support for curses, v2.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJciLFoAAoJEEy22O7T6HE4mI8P/AknxbxN0IROgo/GX9aZMnIQ JiqbYxj4SSXL8P+0IqgsdGXwggGlcnpM8XQa/I1e6yEl7jHQv7sccMb4EZotRJOR k1zeXv4ie8SY7vMOW4MfdbjZ22FKwQ4kTAlRGUAmk1NcuqpmWTH9qwBWgegfiHYP DVqroDf34U32kuDmo4T+m4I5Sgn0uugrD525Z9M6yN3V0dCuPbncb297X9aPd+Ou xrZ50iAT3sfMNIBJU4JjEBQm+jxt2JOupWhsqLwiT7jwzo65vooLgYm4MdF3iGFv hvFEUkE5XdauC7eRuEsmLAtWQ7BzzEFPBZKgexDDRMDQ4ROWxbnUDNqfRmIzxHfG AeCuHn2/iuE4IycoDqE919LOBm/TnPb08Xe9ly7tMXS7NQGsctgruI3DOA7CCjLo ZoTNSHElVmmjDTS5yMWyrYMEkO+W4pjC2+7vAKfj3KvW0RYG+kG1tkWIIsZogZ7C XmcLAKLH9RQVH0UBC0wgHHs36fGnr3DP4WsLKdSrh3OhYXSPClNM+RD7YwTu5c3j +vnCgpqU3yW6Bk9oBP+tiG+KgltaS+tieoGNsvvE41pqV152WuUx9sqiK4ItA9i3 /aEN+YE2bbWnqPAKGpzC8JiNyD75VopkxkuvKkq7TERvC+2ew0USeqfmS1GSedyg pYnwJoJGQa1bCBUmf/S/ =gcY1 -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/kraxel/tags/ui-20190313-pull-request' into staging ui: better unicode support for curses, v2. # gpg: Signature made Wed 13 Mar 2019 07:29:44 GMT # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full] # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full] # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full] # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/ui-20190313-pull-request: curses: add option to specify VGA font encoding iconv: detect and make curses depend on it Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
85ce84489a
6 changed files with 348 additions and 52 deletions
60
configure
vendored
60
configure
vendored
|
@ -1224,6 +1224,10 @@ for opt do
|
|||
;;
|
||||
--enable-curses) curses="yes"
|
||||
;;
|
||||
--disable-iconv) iconv="no"
|
||||
;;
|
||||
--enable-iconv) iconv="yes"
|
||||
;;
|
||||
--disable-curl) curl="no"
|
||||
;;
|
||||
--enable-curl) curl="yes"
|
||||
|
@ -1713,6 +1717,7 @@ disabled with --disable-FEATURE, default is enabled if available:
|
|||
gtk gtk UI
|
||||
vte vte support for the gtk UI
|
||||
curses curses UI
|
||||
iconv font glyph conversion support
|
||||
vnc VNC UI support
|
||||
vnc-sasl SASL encryption for VNC server
|
||||
vnc-jpeg JPEG lossy compression for VNC server
|
||||
|
@ -3434,8 +3439,52 @@ EOF
|
|||
fi
|
||||
fi
|
||||
|
||||
##########################################
|
||||
# iconv probe
|
||||
if test "$iconv" != "no" ; then
|
||||
cat > $TMPC << EOF
|
||||
#include <iconv.h>
|
||||
int main(void) {
|
||||
iconv_t conv = iconv_open("WCHAR_T", "UCS-2");
|
||||
return conv != (iconv_t) -1;
|
||||
}
|
||||
EOF
|
||||
iconv_prefix_list="/usr/local:/usr"
|
||||
iconv_lib_list=":-liconv"
|
||||
IFS=:
|
||||
for iconv_prefix in $iconv_prefix_list; do
|
||||
IFS=:
|
||||
iconv_cflags="-I$iconv_prefix/include"
|
||||
iconv_ldflags="-L$iconv_prefix/lib"
|
||||
for iconv_link in $iconv_lib_list; do
|
||||
unset IFS
|
||||
iconv_lib="$iconv_ldflags $iconv_link"
|
||||
echo "looking at iconv in '$iconv_cflags' '$iconv_lib'" >> config.log
|
||||
if compile_prog "$iconv_cflags" "$iconv_lib" ; then
|
||||
iconv_found=yes
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test "$iconv_found" = yes ; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
if test "$iconv_found" = "yes" ; then
|
||||
iconv=yes
|
||||
else
|
||||
if test "$iconv" = "yes" ; then
|
||||
feature_not_found "iconv" "Install iconv devel"
|
||||
fi
|
||||
iconv=no
|
||||
fi
|
||||
fi
|
||||
|
||||
##########################################
|
||||
# curses probe
|
||||
if test "$iconv" = "no" ; then
|
||||
# curses will need iconv
|
||||
curses=no
|
||||
fi
|
||||
if test "$curses" != "no" ; then
|
||||
if test "$mingw32" = "yes" ; then
|
||||
curses_inc_list="$($pkg_config --cflags ncurses 2>/dev/null):"
|
||||
|
@ -3449,14 +3498,17 @@ if test "$curses" != "no" ; then
|
|||
#include <locale.h>
|
||||
#include <curses.h>
|
||||
#include <wchar.h>
|
||||
#include <langinfo.h>
|
||||
int main(void) {
|
||||
const char *codeset;
|
||||
wchar_t wch = L'w';
|
||||
setlocale(LC_ALL, "");
|
||||
resize_term(0, 0);
|
||||
addwstr(L"wide chars\n");
|
||||
addnwstr(&wch, 1);
|
||||
add_wch(WACS_DEGREE);
|
||||
return 0;
|
||||
codeset = nl_langinfo(CODESET);
|
||||
return codeset != 0;
|
||||
}
|
||||
EOF
|
||||
IFS=:
|
||||
|
@ -6251,6 +6303,7 @@ echo "libgcrypt $gcrypt"
|
|||
echo "nettle $nettle $(echo_version $nettle $nettle_version)"
|
||||
echo "libtasn1 $tasn1"
|
||||
echo "PAM $auth_pam"
|
||||
echo "iconv support $iconv"
|
||||
echo "curses support $curses"
|
||||
echo "virgl support $virglrenderer $(echo_version $virglrenderer $virgl_version)"
|
||||
echo "curl support $curl"
|
||||
|
@ -6586,6 +6639,11 @@ fi
|
|||
if test "$cocoa" = "yes" ; then
|
||||
echo "CONFIG_COCOA=y" >> $config_host_mak
|
||||
fi
|
||||
if test "$iconv" = "yes" ; then
|
||||
echo "CONFIG_ICONV=y" >> $config_host_mak
|
||||
echo "ICONV_CFLAGS=$iconv_cflags" >> $config_host_mak
|
||||
echo "ICONV_LIBS=$iconv_lib" >> $config_host_mak
|
||||
fi
|
||||
if test "$curses" = "yes" ; then
|
||||
echo "CONFIG_CURSES=m" >> $config_host_mak
|
||||
echo "CURSES_CFLAGS=$curses_inc" >> $config_host_mak
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue