From nobody Sun Nov 9 22:32:27 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 155197152684934.74869578081086; Thu, 7 Mar 2019 07:12:06 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 08CF759476; Thu, 7 Mar 2019 15:12:05 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 931625ED55; Thu, 7 Mar 2019 15:12:04 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 50C34181A1E6; Thu, 7 Mar 2019 15:12:04 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x27FBnH7011461 for ; Thu, 7 Mar 2019 10:11:49 -0500 Received: by smtp.corp.redhat.com (Postfix) id 055226B475; Thu, 7 Mar 2019 15:11:49 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-211.ams2.redhat.com [10.36.116.211]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4E33B60E3D; Thu, 7 Mar 2019 15:11:42 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 860B317514; Thu, 7 Mar 2019 16:11:41 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Thu, 7 Mar 2019 16:11:37 +0100 Message-Id: <20190307151141.6483-4-kraxel@redhat.com> In-Reply-To: <20190307151141.6483-1-kraxel@redhat.com> References: <20190307151141.6483-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: libvir-list@redhat.com, "Dr. David Alan Gilbert" , Gerd Hoffmann , Samuel Thibault , Paolo Bonzini Subject: [libvirt] [PULL 3/7] iconv: detect and make curses depend on it X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 07 Mar 2019 15:12:05 +0000 (UTC) Content-Type: text/plain; charset="utf-8" From: Samuel Thibault curses will use it for proper wide output support. Signed-off-by: Samuel Thibault Message-Id: <20190304210217.7056-2-samuel.thibault@ens-lyon.org> Signed-off-by: Gerd Hoffmann --- configure | 40 ++++++++++++++++++++++++++++++++++++++++ vl.c | 2 +- 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/configure b/configure index cefeb8fcce44..c594d2be18c7 100755 --- a/configure +++ b/configure @@ -1214,6 +1214,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" @@ -1703,6 +1707,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 @@ -3424,8 +3429,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):" @@ -6137,6 +6173,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" @@ -6461,6 +6498,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 4c5cc0d8ad91..b1eef2b60a03 100644 --- a/vl.c +++ b/vl.c @@ -3172,7 +3172,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.18.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list