[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH/RFC 5/7] configure: split PNG support from vnc_png f
From: |
Marc-André Lureau |
Subject: |
[Qemu-devel] [PATCH/RFC 5/7] configure: split PNG support from vnc_png feature |
Date: |
Mon, 12 Mar 2012 14:11:31 +0100 |
---
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 <<EOF
//#include <stdio.h>
#include <png.h>
@@ -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
--
1.7.7.6
- [Qemu-devel] [PATCH/RFC 2/7] Allow a qemu_fopen_socket() to be opened for writing, (continued)
- [Qemu-devel] [PATCH/RFC 2/7] Allow a qemu_fopen_socket() to be opened for writing, Marc-André Lureau, 2012/03/12
- [Qemu-devel] [PATCH/RFC 4/7] Allow saving screendump to a UNIX socket, Marc-André Lureau, 2012/03/12
- [Qemu-devel] [PATCH/RFC 7/7] Add PNG screendump, Marc-André Lureau, 2012/03/12
- [Qemu-devel] [PATCH/RFC 1/7] ppm_save: use QEMUFile, Marc-André Lureau, 2012/03/12
- [Qemu-devel] [PATCH/RFC 6/7] Isolate color conversion from PPM handling, Marc-André Lureau, 2012/03/12
- [Qemu-devel] [PATCH/RFC 3/7] Close socket when closing QEMUFile, Marc-André Lureau, 2012/03/12
- [Qemu-devel] [PATCH/RFC 5/7] configure: split PNG support from vnc_png feature,
Marc-André Lureau <=
- Re: [Qemu-devel] [PATCH/RFC 0/7] Screendump to UNIX socket & in PNG format, Eric Blake, 2012/03/12
- Re: [Qemu-devel] [PATCH/RFC 0/7] Screendump to UNIX socket & in PNG format, Daniel P. Berrange, 2012/03/12
- Re: [Qemu-devel] [PATCH/RFC 0/7] Screendump to UNIX socket & in PNG format, Anthony Liguori, 2012/03/12
Re: [Qemu-devel] [PATCH/RFC 0/7] Screendump to UNIX socket & in PNG format, Stefan Hajnoczi, 2012/03/12