From patchwork Mon Mar 12 13:11:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Marc-Andr=C3=A9_Lureau?= X-Patchwork-Id: 146136 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BF648B6FA8 for ; Tue, 13 Mar 2012 02:36:52 +1100 (EST) Received: from localhost ([::1]:57110 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S77Ii-0007n3-JI for incoming@patchwork.ozlabs.org; Mon, 12 Mar 2012 11:36:44 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49883) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S753F-0003Bd-IY for qemu-devel@nongnu.org; Mon, 12 Mar 2012 09:12:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S752j-0002Va-5q for qemu-devel@nongnu.org; Mon, 12 Mar 2012 09:12:36 -0400 Received: from mail-ey0-f173.google.com ([209.85.215.173]:34677) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S752i-0002UT-TO for qemu-devel@nongnu.org; Mon, 12 Mar 2012 09:12:05 -0400 Received: by eaaf11 with SMTP id f11so1246704eaa.4 for ; Mon, 12 Mar 2012 06:11:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=J5dobiVUyFUJl4b5OEi8H3DWcH+B4VA+pHIE+FS3wxQ=; b=B1UqETnyu3SqmAfOZ7osu5eagOJKA6TLfiQdg92GaakisVwR4tmnUUK2jSz0RRFA1C A2TL/LRsreyM+GKYANyuURNxPrw14/rnJ91HU9qYMsJ+vtRRb8Sd23P5snDBhWeFXR8S bWECJBkCon9+O5p61lBosxFd0d/i0GH+eGqMJavJkSUZnFqdT9Oohl0/3GKQtSWdce9X oRrvVffe7zYgpfAKW0mCLN0/ld/LXk/zgi5zuvd+oDSzwuCRYecZcP+KzAXOixl9I1UK ALX9Eped05Es32qDpOZI/paMz5KVZJuSYDCXe1YjdfuzPHB980wvFhcGBaPnWYL148vr QzYw== Received: by 10.213.9.8 with SMTP id j8mr999164ebj.102.1331557919436; Mon, 12 Mar 2012 06:11:59 -0700 (PDT) Received: from localhost (133.pool85-58-35.dynamic.orange.es. [85.58.35.133]) by mx.google.com with ESMTPS id u9sm49678690eem.11.2012.03.12.06.11.57 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 12 Mar 2012 06:11:58 -0700 (PDT) From: "=?UTF-8?q?Marc-Andr=C3=A9=20Lureau?=" To: qemu-devel@nongnu.org Date: Mon, 12 Mar 2012 14:11:31 +0100 Message-Id: <1331557893-30806-6-git-send-email-marcandre.lureau@redhat.com> X-Mailer: git-send-email 1.7.7.6 In-Reply-To: <1331557893-30806-1-git-send-email-marcandre.lureau@redhat.com> References: <1331557893-30806-1-git-send-email-marcandre.lureau@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.85.215.173 Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [Qemu-devel] [PATCH/RFC 5/7] configure: split PNG support from vnc_png feature X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org --- Makefile.target | 2 +- configure | 42 ++++++++++++++++++++++++++++++++---------- 2 files changed, 33 insertions(+), 11 deletions(-) diff --git a/Makefile.target b/Makefile.target index 1bd25a8..e5273f2 100644 --- a/Makefile.target +++ b/Makefile.target @@ -215,7 +215,7 @@ obj-i386-$(CONFIG_KVM) += hyperv.o QEMU_CFLAGS += $(VNC_TLS_CFLAGS) QEMU_CFLAGS += $(VNC_SASL_CFLAGS) QEMU_CFLAGS += $(VNC_JPEG_CFLAGS) -QEMU_CFLAGS += $(VNC_PNG_CFLAGS) +QEMU_CFLAGS += $(PNG_CFLAGS) # xen support obj-$(CONFIG_XEN) += xen-all.o xen_machine_pv.o xen_domainbuild.o xen-mapcache.o diff --git a/configure b/configure index 39d2b54..3abdf3f 100755 --- a/configure +++ b/configure @@ -123,6 +123,7 @@ curses="" docs="" fdt="" nptl="" +png="" sdl="" virtfs="" vnc="yes" @@ -602,6 +603,10 @@ for opt do # configure to be used by RPM and similar macros that set # lots of directory switches by default. ;; + --disable-png) png="no" + ;; + --enable-png) png="yes" + ;; --disable-sdl) sdl="no" ;; --enable-sdl) sdl="yes" @@ -1043,6 +1048,8 @@ echo " --disable-vnc-png disable PNG compression for VNC server (default echo " --enable-vnc-png enable PNG compression for VNC server" echo " --disable-vnc-thread disable threaded VNC server" echo " --enable-vnc-thread enable threaded VNC server" +echo " --disable-png disable PNG compression (default)" +echo " --enable-png enable PNG compression" echo " --disable-curses disable curses output" echo " --enable-curses enable curses output" echo " --disable-curl disable curl connectivity" @@ -1648,8 +1655,8 @@ EOF fi ########################################## -# VNC PNG detection -if test "$vnc" = "yes" -a "$vnc_png" != "no" ; then +# PNG detection +if test "$png" != "no"; then cat > $TMPC < #include @@ -1661,16 +1668,27 @@ int main(void) { } EOF if $pkg_config libpng --modversion >/dev/null 2>&1; then - vnc_png_cflags=`$pkg_config libpng --cflags 2> /dev/null` - vnc_png_libs=`$pkg_config libpng --libs 2> /dev/null` + png_cflags=`$pkg_config libpng --cflags 2> /dev/null` + png_libs=`$pkg_config libpng --libs 2> /dev/null` + else + png_cflags="" + png_libs="-lpng" + fi + if compile_prog "$png_cflags" "$png_libs" ; then + png=yes + libs_softmmu="$png_libs $libs_softmmu" + QEMU_CFLAGS="$QEMU_CFLAGS $png_cflags" else - vnc_png_cflags="" - vnc_png_libs="-lpng" + if test "$png" = "yes" ; then + feature_not_found "png" + fi + png=no fi - if compile_prog "$vnc_png_cflags" "$vnc_png_libs" ; then +fi + +if test "$vnc" = "yes" -a "$vnc_png" != "no"; then + if test "$png" = "yes" ; then vnc_png=yes - libs_softmmu="$vnc_png_libs $libs_softmmu" - QEMU_CFLAGS="$QEMU_CFLAGS $vnc_png_cflags" else if test "$vnc_png" = "yes" ; then feature_not_found "vnc-png" @@ -2879,6 +2897,7 @@ if test "$darwin" = "yes" ; then echo "Cocoa support $cocoa" fi echo "SDL support $sdl" +echo "PNG support $png" echo "curses support $curses" echo "curl support $curl" echo "mingw32 support $mingw32" @@ -3067,7 +3086,10 @@ if test "$vnc_jpeg" = "yes" ; then fi if test "$vnc_png" = "yes" ; then echo "CONFIG_VNC_PNG=y" >> $config_host_mak - echo "VNC_PNG_CFLAGS=$vnc_png_cflags" >> $config_host_mak +fi +if test "$png" = "yes" ; then + echo "PNG_CFLAGS=$png_cflags" >> $config_host_mak + echo "CONFIG_PNG=y" >> $config_host_mak fi if test "$vnc_thread" = "yes" ; then echo "CONFIG_VNC_THREAD=y" >> $config_host_mak