From nobody Mon Nov 10 01:13:37 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; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15524627721111022.5015322478033; Wed, 13 Mar 2019 00:39:32 -0700 (PDT) Received: from localhost ([127.0.0.1]:39885 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3yU5-0002sv-1F for importer@patchew.org; Wed, 13 Mar 2019 03:39:29 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35655) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3yRo-0001Z7-Jx for qemu-devel@nongnu.org; Wed, 13 Mar 2019 03:37:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3yLV-0002id-TB for qemu-devel@nongnu.org; Wed, 13 Mar 2019 03:30:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44008) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h3yLV-0002iS-KA for qemu-devel@nongnu.org; Wed, 13 Mar 2019 03:30:37 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C93592DE40F; Wed, 13 Mar 2019 07:30:36 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-24.ams2.redhat.com [10.36.116.24]) by smtp.corp.redhat.com (Postfix) with ESMTP id F19755D73F; Wed, 13 Mar 2019 07:30:33 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 1F63817534; Wed, 13 Mar 2019 08:30:32 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Wed, 13 Mar 2019 08:30:31 +0100 Message-Id: <20190313073032.19904-2-kraxel@redhat.com> In-Reply-To: <20190313073032.19904-1-kraxel@redhat.com> References: <20190313073032.19904-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Wed, 13 Mar 2019 07:30:36 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 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: Paolo Bonzini , Gerd Hoffmann , Samuel Thibault , Markus Armbruster Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: <20190311135127.2229-2-samuel.thibault@ens-lyon.org> Signed-off-by: Gerd Hoffmann --- configure | 55 ++++++++++++++++++++++++++++++++++++++++++++++++ vl.c | 2 +- ui/Makefile.objs | 4 ++-- 3 files changed, 58 insertions(+), 3 deletions(-) diff --git a/configure b/configure index cab830a4c920..e1c1ed6c72b3 100755 --- a/configure +++ b/configure @@ -1222,6 +1222,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" @@ -1711,6 +1715,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 @@ -3432,8 +3437,52 @@ 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 + iconv_prefix_list=3D"/usr/local:/usr" + iconv_lib_list=3D":-liconv" + IFS=3D: + for iconv_prefix in $iconv_prefix_list; do + IFS=3D: + iconv_cflags=3D"-I$iconv_prefix/include" + iconv_ldflags=3D"-L$iconv_prefix/lib" + for iconv_link in $iconv_lib_list; do + unset IFS + iconv_lib=3D"$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=3Dyes + break + fi + done + if test "$iconv_found" =3D yes ; then + 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):" @@ -6217,6 +6266,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" @@ -6552,6 +6602,11 @@ 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 + echo "ICONV_CFLAGS=3D$iconv_cflags" >> $config_host_mak + echo "ICONV_LIBS=3D$iconv_lib" >> $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 f46f8d769a5c..8ecbed2893c2 100644 --- a/vl.c +++ b/vl.c @@ -3170,7 +3170,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; diff --git a/ui/Makefile.objs b/ui/Makefile.objs index fe1a7aed97c2..cc2bf5b180f3 100644 --- a/ui/Makefile.objs +++ b/ui/Makefile.objs @@ -46,8 +46,8 @@ endif =20 common-obj-$(CONFIG_CURSES) +=3D curses.mo curses.mo-objs :=3D curses.o -curses.mo-cflags :=3D $(CURSES_CFLAGS) -curses.mo-libs :=3D $(CURSES_LIBS) +curses.mo-cflags :=3D $(CURSES_CFLAGS) $(ICONV_CFLAGS) +curses.mo-libs :=3D $(CURSES_LIBS) $(ICONV_LIBS) =20 common-obj-$(call land,$(CONFIG_SPICE),$(CONFIG_GIO)) +=3D spice-app.mo spice-app.mo-objs :=3D spice-app.o --=20 2.18.1