From patchwork Wed Jun 22 22:23:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 9193863 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 DAF5760890 for ; Wed, 22 Jun 2016 22:24:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C8D1628418 for ; Wed, 22 Jun 2016 22:24:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BDDFE2841E; Wed, 22 Jun 2016 22:24:18 +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 602222841B for ; Wed, 22 Jun 2016 22:24:18 +0000 (UTC) Received: from localhost ([::1]:32927 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFqZF-00045Y-3R for patchwork-qemu-devel@patchwork.kernel.org; Wed, 22 Jun 2016 18:24:17 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59654) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFqYa-00043c-UM for qemu-devel@nongnu.org; Wed, 22 Jun 2016 18:23:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bFqYU-0006EM-NG for qemu-devel@nongnu.org; Wed, 22 Jun 2016 18:23:36 -0400 Received: from hera.aquilenet.fr ([141.255.128.1]:51246) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bFqYU-0006DS-Ag for qemu-devel@nongnu.org; Wed, 22 Jun 2016 18:23:30 -0400 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id D65488ABB; Thu, 23 Jun 2016 00:23:22 +0200 (CEST) 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 ya42CqXQTWOm; Thu, 23 Jun 2016 00:23:22 +0200 (CEST) Received: from var.youpi.perso.aquilenet.fr (ARennes-656-1-291-142.w2-10.abo.wanadoo.fr [2.10.55.142]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 8A5A08943; Thu, 23 Jun 2016 00:23:22 +0200 (CEST) Received: from samy by var.youpi.perso.aquilenet.fr with local (Exim 4.87) (envelope-from ) id 1bFqYO-0006Pq-SA; Thu, 23 Jun 2016 00:23:24 +0200 From: Samuel Thibault To: qemu-devel@nongnu.org, kraxel@redhat.com, pbonzini@redhat.com, berrange@redhat.com, peter.maydell@linaro.org, mjt@tls.msk.ru Date: Thu, 23 Jun 2016 00:23:19 +0200 Message-Id: <1466634202-24616-3-git-send-email-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1466634202-24616-1-git-send-email-samuel.thibault@ens-lyon.org> References: <1466634202-24616-1-git-send-email-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 2/5] curses: Use cursesw when available 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 Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Samuel Thibault --- configure | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 10cb212..ff10012 100755 --- a/configure +++ b/configure @@ -203,6 +203,7 @@ bluez="" brlapi="" curl="" curses="" +cursesw="" docs="" fdt="" netmap="no" @@ -978,6 +979,10 @@ for opt do ;; --enable-curses) curses="yes" ;; + --disable-cursesw) cursesw="no" + ;; + --enable-cursesw) cursesw="yes" + ;; --disable-curl) curl="no" ;; --enable-curl) curl="yes" @@ -1327,6 +1332,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 + cursesw cursesw UI vnc VNC UI support vnc-sasl SASL encryption for VNC server vnc-jpeg JPEG lossy compression for VNC server @@ -2873,8 +2879,60 @@ EOF fi ########################################## +# cursesw probe +if test "$cursesw" != "no" ; then + if test "$mingw32" = "yes" ; then + cursesw_inc_list="$($pkg_config --cflags ncursesw 2>/dev/null):" + cursesw_lib_list="$($pkg_config --libs ncursesw 2>/dev/null):-lpdcurses" + else + cursesw_inc_list="$($pkg_config --cflags ncursesw 2>/dev/null):" + cursesw_lib_list="$($pkg_config --libs ncursesw 2>/dev/null):-lncursesw:-lcursesw:-lncurses:-lcurses" + fi + cursesw_found=no + cat > $TMPC << EOF +#include +#include +#include +#include +int main(void) { + const char *s = curses_version(); + const char *codeset; + wchar_t wch = L'w'; + setlocale(LC_ALL, ""); + resize_term(0, 0); + addwstr(L"wide chars\n"); + addnwstr(&wch, 1); + codeset = nl_langinfo(CODESET); + return s != 0 && codeset != 0; +} +EOF + IFS=: + for cursesw_inc in $cursesw_inc_list; do + for cursesw_lib in $cursesw_lib_list; do + unset IFS + if compile_prog "$cursesw_inc" "$cursesw_lib" ; then + cursesw_found=yes + QEMU_CFLAGS="$cursesw_inc $QEMU_CFLAGS" + libs_softmmu="$cursesw_lib $libs_softmmu" + break + fi + done + done + unset IFS + if test "$cursesw_found" = "yes" ; then + cursesw=yes + curses=yes + else + if test "$cursesw" = "yes" ; then + feature_not_found "cursesw" "Install ncursesw devel" + fi + cursesw=no + fi +fi + +########################################## # curses probe -if test "$curses" != "no" ; then +if test "$curses" != "no" -a "$cursesw" != "yes"; then if test "$mingw32" = "yes" ; then curses_list="$($pkg_config --libs ncurses 2>/dev/null):-lpdcurses" else @@ -4800,6 +4858,7 @@ echo "nettle $nettle $(echo_version $nettle $nettle_version)" echo "nettle kdf $nettle_kdf" echo "libtasn1 $tasn1" echo "curses support $curses" +echo "cursesw support $cursesw" echo "virgl support $virglrenderer" echo "curl support $curl" echo "mingw32 support $mingw32" @@ -5058,6 +5117,9 @@ fi if test "$curses" = "yes" ; then echo "CONFIG_CURSES=y" >> $config_host_mak fi +if test "$cursesw" = "yes" ; then + echo "CONFIG_CURSESW=y" >> $config_host_mak +fi if test "$utimens" = "yes" ; then echo "CONFIG_UTIMENSAT=y" >> $config_host_mak fi