]> git.proxmox.com Git - qemu.git/commitdiff
Add support for finding libpng via pkg-config.
authorBrad <brad@comstyle.com>
Sat, 30 Jul 2011 05:45:55 +0000 (01:45 -0400)
committerJustin M. Forbes <jforbes@redhat.com>
Mon, 3 Oct 2011 19:41:44 +0000 (14:41 -0500)
Signed-off-by: Brad Smith <brad@comstyle.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
configure

index 85c7aaefdfad97a0e82086b42742a80155a247b7..29d621211956cc95a510e800a08eb21264202672 100755 (executable)
--- a/configure
+++ b/configure
@@ -1518,11 +1518,17 @@ int main(void) {
     return 0;
 }
 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`
+  else
     vnc_png_cflags=""
     vnc_png_libs="-lpng"
+  fi
   if compile_prog "$vnc_png_cflags" "$vnc_png_libs" ; 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"