]> Git Repo - qemu.git/commitdiff
Add support for finding libpng via pkg-config.
authorBrad <[email protected]>
Sat, 30 Jul 2011 05:45:55 +0000 (01:45 -0400)
committerAnthony Liguori <[email protected]>
Thu, 4 Aug 2011 21:43:10 +0000 (16:43 -0500)
Signed-off-by: Brad Smith <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
configure

index fc608888438e18c27d5befb9304f4f09756f8de6..269bf43e1331fc3431ae6599edeabd687bbb755a 100755 (executable)
--- a/configure
+++ b/configure
@@ -1512,11 +1512,17 @@ int main(void) {
     return 0;
 }
 EOF
     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"
     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"
   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"
   else
     if test "$vnc_png" = "yes" ; then
       feature_not_found "vnc-png"
This page took 0.030529 seconds and 4 git commands to generate.