From nobody Sun Nov 9 20:19:52 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1551734421011864.5164239577396; Mon, 4 Mar 2019 13:20:21 -0800 (PST) Received: from localhost ([127.0.0.1]:33195 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h0v0U-0007g1-0g for importer@patchew.org; Mon, 04 Mar 2019 16:20:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:35407) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h0uuS-0003Hc-BJ for qemu-devel@nongnu.org; Mon, 04 Mar 2019 16:14:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h0ujC-0002AM-Lp for qemu-devel@nongnu.org; Mon, 04 Mar 2019 16:02:28 -0500 Received: from hera.aquilenet.fr ([2a0c:e300::1]:55678) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h0ujB-00021K-BE for qemu-devel@nongnu.org; Mon, 04 Mar 2019 16:02:26 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 3E4B511CCF; Mon, 4 Mar 2019 22:02:21 +0100 (CET) Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mi9uXa5CYH4A; Mon, 4 Mar 2019 22:02:18 +0100 (CET) Received: from function (dhcp-97-159.dsi-ext.ens-lyon.fr [140.77.97.159]) by hera.aquilenet.fr (Postfix) with ESMTPSA id D170F11CCC; Mon, 4 Mar 2019 22:02:18 +0100 (CET) Received: from samy by function with local (Exim 4.92-RC6) (envelope-from ) id 1h0uj4-0001qZ-Ai; Mon, 04 Mar 2019 22:02:18 +0100 X-Virus-Scanned: Debian amavisd-new at aquilenet.fr From: Samuel Thibault To: qemu-devel@nongnu.org Date: Mon, 4 Mar 2019 22:02:16 +0100 Message-Id: <20190304210217.7056-2-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190304210217.7056-1-samuel.thibault@ens-lyon.org> References: <20190304210217.7056-1-samuel.thibault@ens-lyon.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a0c:e300::1 Subject: [Qemu-devel] [PATCHv2 1/2] iconv: detect and make curses depend on it X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ekohler@gmail.com, armbru@redhat.com, kraxel@redhat.com, pbonzini@redhat.com, Samuel Thibault Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" curses will use it for proper wide output support. Signed-off-by: Samuel Thibault --- configure | 40 ++++++++++++++++++++++++++++++++++++++++ vl.c | 2 +- 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 540bee19ba..9979ca708d 100755 --- a/configure +++ b/configure @@ -1217,6 +1217,10 @@ for opt do ;; --enable-curses) curses=3D"yes" ;; + --disable-iconv) iconv=3D"no" + ;; + --enable-iconv) iconv=3D"yes" + ;; --disable-curl) curl=3D"no" ;; --enable-curl) curl=3D"yes" @@ -1718,6 +1722,7 @@ disabled with --disable-FEATURE, default is enabled i= f 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 @@ -3398,8 +3403,39 @@ EOF fi fi =20 +########################################## +# iconv probe +if test "$iconv" !=3D "no" ; then + cat > $TMPC << EOF +#include +int main(void) { + iconv_t conv =3D iconv_open("WCHAR_T", "UCS-2"); + return conv !=3D (iconv_t) -1; +} +EOF + for iconv_lib in '' -liconv; do + if compile_prog "" "$iconv_lib" ; then + iconv_found=3Dyes + libs_softmmu=3D"$iconv_lib $libs_softmmu" + break + fi + done + if test "$iconv_found" =3D "yes" ; then + iconv=3Dyes + else + if test "$iconv" =3D "yes" ; then + feature_not_found "iconv" "Install iconv devel" + fi + iconv=3Dno + fi +fi + ########################################## # curses probe +if test "$iconv" =3D "no" ; then + # curses will need iconv + curses=3Dno +fi if test "$curses" !=3D "no" ; then if test "$mingw32" =3D "yes" ; then curses_inc_list=3D"$($pkg_config --cflags ncurses 2>/dev/null):" @@ -6111,6 +6147,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 $virg= l_version)" echo "curl support $curl" @@ -6435,6 +6472,9 @@ fi if test "$cocoa" =3D "yes" ; then echo "CONFIG_COCOA=3Dy" >> $config_host_mak fi +if test "$iconv" =3D "yes" ; then + echo "CONFIG_ICONV=3Dy" >> $config_host_mak +fi if test "$curses" =3D "yes" ; then echo "CONFIG_CURSES=3Dm" >> $config_host_mak echo "CURSES_CFLAGS=3D$curses_inc" >> $config_host_mak diff --git a/vl.c b/vl.c index 502857a176..c8594fc6d5 100644 --- a/vl.c +++ b/vl.c @@ -3171,7 +3171,7 @@ int main(int argc, char **argv, char **envp) #ifdef CONFIG_CURSES dpy.type =3D DISPLAY_TYPE_CURSES; #else - error_report("curses support is disabled"); + error_report("curses or iconv support is disabled"); exit(1); #endif break; --=20 2.20.1