[gdk-pixbuf] Check for different versions of libpng not just libpng12



commit ddedf5a2c2c63bfe8d6f04376cf2bba215a5eb19
Author: Fridrich Å trba <fridrich strba bluewin ch>
Date:   Mon Jun 28 19:15:32 2010 +0200

    Check for different versions of libpng not just libpng12

 configure.ac |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 5b6e6b8..053b8b1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -589,13 +589,19 @@ fi
 
 dnl Test for libpng
   if test x$with_libpng != xno && test -z "$LIBPNG"; then
-    AC_MSG_CHECKING(for libpng12)
-    if $PKG_CONFIG --exists libpng12 ; then
+    for l in libpng libpng14 libpng12 libpng13 libpng10 ; do
+      AC_MSG_CHECKING(for $l)
+      if $PKG_CONFIG --exists $l ; then
         AC_MSG_RESULT(yes)
         PNG='png'
-        PNG_DEP_CFLAGS_PACKAGES=libpng12
-        LIBPNG=`$PKG_CONFIG --libs libpng12`
-    else
+        PNG_DEP_CFLAGS_PACKAGES=$l
+        LIBPNG=`$PKG_CONFIG --libs $l`
+        break
+      else
+        AC_MSG_RESULT(no)
+      fi
+    done
+    if test x$PNG != xpng; then
       AC_MSG_RESULT(no)
       AC_CHECK_LIB(png, png_read_info,
         [AC_CHECK_HEADER(png.h,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]