From patchwork Sun Oct 30 14:01:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 9404501 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 592C26022E for ; Sun, 30 Oct 2016 14:05:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3580A29070 for ; Sun, 30 Oct 2016 14:05:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 27EE529079; Sun, 30 Oct 2016 14:05:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 97E1B29070 for ; Sun, 30 Oct 2016 14:05:08 +0000 (UTC) Received: from localhost ([::1]:58657 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c0qjT-0003pi-Vt for patchwork-qemu-devel@patchwork.kernel.org; Sun, 30 Oct 2016 10:05:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38531) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c0qfq-0001Di-Q3 for qemu-devel@nongnu.org; Sun, 30 Oct 2016 10:01:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c0qfn-0008Ks-RW for qemu-devel@nongnu.org; Sun, 30 Oct 2016 10:01:22 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:44363) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c0qfn-0008K6-Is for qemu-devel@nongnu.org; Sun, 30 Oct 2016 10:01:19 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 52F2B8E14; Sun, 30 Oct 2016 15:01:16 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr 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 7OW9aEIb5n9I; Sun, 30 Oct 2016 15:01:14 +0100 (CET) Received: from var.youpi.perso.aquilenet.fr (unknown [IPv6:2a01:cb19:181:c200:3602:86ff:fe2c:6a19]) by hera.aquilenet.fr (Postfix) with ESMTPSA id E02BC9AC9; Sun, 30 Oct 2016 15:01:14 +0100 (CET) Received: from samy by var.youpi.perso.aquilenet.fr with local (Exim 4.87) (envelope-from ) id 1c0qfi-0004n3-4W; Sun, 30 Oct 2016 15:01:14 +0100 From: Samuel Thibault To: qemu-devel@nongnu.org Date: Sun, 30 Oct 2016 15:01:12 +0100 Message-Id: <20161030140113.18373-2-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20161030140113.18373-1-samuel.thibault@ens-lyon.org> References: <20161030140113.18373-1-samuel.thibault@ens-lyon.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 141.255.128.1 Subject: [Qemu-devel] [PATCH 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: Samuel Thibault , Gerd Hoffmann , Paolo Bonzini Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 f83cdf8..42af965 100755 --- a/configure +++ b/configure @@ -979,6 +979,10 @@ for opt do ;; --enable-curses) curses="yes" ;; + --disable-iconv) iconv="no" + ;; + --enable-iconv) iconv="yes" + ;; --disable-curl) curl="no" ;; --enable-curl) curl="yes" @@ -1353,6 +1357,7 @@ disabled with --disable-FEATURE, default is enabled if available: --with-gtkabi select preferred GTK ABI 2.0 or 3.0 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 @@ -2914,7 +2919,38 @@ EOF fi ########################################## +# iconv probe +if test "$iconv" != "no" ; then + cat > $TMPC << EOF +#include +int main(void) { + iconv_t conv = iconv_open("WCHAR_T", "UCS-2"); + return conv != (iconv_t) -1; +} +EOF + for iconv_lib in '' -liconv; do + if compile_prog "" "$iconv_lib" ; then + iconv_found=yes + libs_softmmu="$iconv_lib $libs_softmmu" + 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):" @@ -4972,6 +5008,7 @@ echo "libgcrypt kdf $gcrypt_kdf" echo "nettle $nettle $(echo_version $nettle $nettle_version)" echo "nettle kdf $nettle_kdf" echo "libtasn1 $tasn1" +echo "iconv support $iconv" echo "curses support $curses" echo "virgl support $virglrenderer" echo "curl support $curl" @@ -5226,6 +5263,9 @@ 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 +fi if test "$curses" = "yes" ; then echo "CONFIG_CURSES=y" >> $config_host_mak fi diff --git a/vl.c b/vl.c index 74dfe4e..136f6f4 100644 --- a/vl.c +++ b/vl.c @@ -2185,7 +2185,7 @@ static DisplayType select_display(const char *p) #ifdef CONFIG_CURSES display = DT_CURSES; #else - error_report("curses support is disabled"); + error_report("curses or iconv support is disabled"); exit(1); #endif } else if (strstart(p, "gtk", &opts)) {