[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.0.1-4-2877-g8fe555b

Mike Hommey glandium at debian.org
Sat Oct 25 11:06:23 UTC 2008


The following commit has been merged in the debian/experimental branch:
commit 1f8e3032c397706aa3a9451bcbde21ff003ec2ae
Author: Mike Hommey <glandium at debian.org>
Date:   Sat Oct 25 12:56:09 2008 +0200

    Properly check and link against libpng
    
    https://bugs.webkit.org/show_bug.cgi?id=21884

diff --git a/GNUmakefile.am b/GNUmakefile.am
index d63149c..f21ff48 100644
--- a/GNUmakefile.am
+++ b/GNUmakefile.am
@@ -212,6 +212,7 @@ libWebCore_la_LIBADD = \
 	$(LIBXSLT_LIBS) \
 	$(HILDON_LIBS) \
 	$(JPEG_LIBS) \
+	$(PNG_LIBS) \
 	-lpthread
 
 # WebKit
diff --git a/GNUmakefile.in b/GNUmakefile.in
index 02db7f8..01da0c0 100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -1620,7 +1620,8 @@ libWebCore_la_DEPENDENCIES = libJavaScriptCore.la libWebCoreJS.la \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
 	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+	$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+	$(am__DEPENDENCIES_1)
 am__libWebCore_la_SOURCES_DIST =  \
 	WebCore/ForwardingHeaders/kjs/Activation.h \
 	WebCore/ForwardingHeaders/kjs/ArgList.h \
@@ -4945,6 +4946,7 @@ PANGO_LIBS = @PANGO_LIBS@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
 PKG_CONFIG = @PKG_CONFIG@
+PNG_LIBS = @PNG_LIBS@
 RANLIB = @RANLIB@
 SED = @SED@
 SET_MAKE = @SET_MAKE@
@@ -6969,6 +6971,7 @@ libWebCore_la_LIBADD = \
 	$(LIBXSLT_LIBS) \
 	$(HILDON_LIBS) \
 	$(JPEG_LIBS) \
+	$(PNG_LIBS) \
 	-lpthread
 
 
diff --git a/configure b/configure
index 6a74d2c..1e4dd82 100755
--- a/configure
+++ b/configure
@@ -898,6 +898,7 @@ GLIB_GENMARSHAL
 GLIB_MKENUMS
 JPEG_LIBS
 PKG_CONFIG
+PNG_LIBS
 icu_config
 UNICODE_CFLAGS
 UNICODE_LIBS
@@ -5341,7 +5342,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 5344 "configure"' > conftest.$ac_ext
+  echo '#line 5345 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -8216,11 +8217,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8219: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8220: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8223: \$? = $ac_status" >&5
+   echo "$as_me:8224: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8506,11 +8507,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8509: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8510: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:8513: \$? = $ac_status" >&5
+   echo "$as_me:8514: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -8610,11 +8611,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:8613: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:8614: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:8617: \$? = $ac_status" >&5
+   echo "$as_me:8618: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -10987,7 +10988,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 10990 "configure"
+#line 10991 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11087,7 +11088,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 11090 "configure"
+#line 11091 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -13488,11 +13489,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13491: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13492: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:13495: \$? = $ac_status" >&5
+   echo "$as_me:13496: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -13592,11 +13593,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:13595: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:13596: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:13599: \$? = $ac_status" >&5
+   echo "$as_me:13600: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -15190,11 +15191,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:15193: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:15194: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:15197: \$? = $ac_status" >&5
+   echo "$as_me:15198: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -15294,11 +15295,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:15297: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:15298: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:15301: \$? = $ac_status" >&5
+   echo "$as_me:15302: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -17514,11 +17515,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17517: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17518: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:17521: \$? = $ac_status" >&5
+   echo "$as_me:17522: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -17804,11 +17805,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17807: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17808: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:17811: \$? = $ac_status" >&5
+   echo "$as_me:17812: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -17908,11 +17909,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17911: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17912: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:17915: \$? = $ac_status" >&5
+   echo "$as_me:17916: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -22570,6 +22571,282 @@ echo "$as_me: error: Cannot find pkg-config, make sure it is installed in your P
    { (exit 1); exit 1; }; }
 fi
 
+# Check for libpng the way Gtk+ does it
+{ echo "$as_me:$LINENO: checking for libpng12" >&5
+echo $ECHO_N "checking for libpng12... $ECHO_C" >&6; }
+if $PKG_CONFIG --exists libpng12 ; then
+    { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+    PNG_LIBS=`$PKG_CONFIG --libs libpng12`
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+  { echo "$as_me:$LINENO: checking for png_read_info in -lpng" >&5
+echo $ECHO_N "checking for png_read_info in -lpng... $ECHO_C" >&6; }
+if test "${ac_cv_lib_png_png_read_info+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpng -lz -lm $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char png_read_info ();
+int
+main ()
+{
+return png_read_info ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  ac_cv_lib_png_png_read_info=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_png_png_read_info=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_read_info" >&5
+echo "${ECHO_T}$ac_cv_lib_png_png_read_info" >&6; }
+if test $ac_cv_lib_png_png_read_info = yes; then
+  if test "${ac_cv_header_png_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for png.h" >&5
+echo $ECHO_N "checking for png.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_png_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_png_h" >&5
+echo "${ECHO_T}$ac_cv_header_png_h" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking png.h usability" >&5
+echo $ECHO_N "checking png.h usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <png.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking png.h presence" >&5
+echo $ECHO_N "checking png.h presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <png.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: png.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: png.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: png.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: png.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: png.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: png.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: png.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: png.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: png.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: png.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: png.h: in the future, the compiler will take precedence" >&2;}
+    ( cat <<\_ASBOX
+## -------------------------------------- ##
+## Report this to http://bugs.webkit.org/ ##
+## -------------------------------------- ##
+_ASBOX
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for png.h" >&5
+echo $ECHO_N "checking for png.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_png_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_png_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_png_h" >&5
+echo "${ECHO_T}$ac_cv_header_png_h" >&6; }
+
+fi
+if test $ac_cv_header_png_h = yes; then
+  png_ok=yes
+else
+  png_ok=no
+fi
+
+
+else
+  { { echo "$as_me:$LINENO: error: PNG library (libpng) not found" >&5
+echo "$as_me: error: PNG library (libpng) not found" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+  if test "$png_ok" = yes; then
+    { echo "$as_me:$LINENO: checking for png_structp in png.h" >&5
+echo $ECHO_N "checking for png_structp in png.h... $ECHO_C" >&6; }
+    cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <png.h>
+int
+main ()
+{
+png_structp pp; png_infop info; png_colorp cmap; png_create_read_struct;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  png_ok=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	png_ok=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    { echo "$as_me:$LINENO: result: $png_ok" >&5
+echo "${ECHO_T}$png_ok" >&6; }
+    if test "$png_ok" = yes; then
+      PNG_LIBS='-lpng -lz'
+    else
+      { { echo "$as_me:$LINENO: error: PNG library (libpng) not found" >&5
+echo "$as_me: error: PNG library (libpng) not found" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+  else
+   { { echo "$as_me:$LINENO: error: PNG library (libpng) not found" >&5
+echo "$as_me: error: PNG library (libpng) not found" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+fi
+
+
 # determine the Unicode backend
 { echo "$as_me:$LINENO: checking the Unicode backend to use" >&5
 echo $ECHO_N "checking the Unicode backend to use... $ECHO_C" >&6; }
@@ -26498,6 +26775,7 @@ GLIB_GENMARSHAL!$GLIB_GENMARSHAL$ac_delim
 GLIB_MKENUMS!$GLIB_MKENUMS$ac_delim
 JPEG_LIBS!$JPEG_LIBS$ac_delim
 PKG_CONFIG!$PKG_CONFIG$ac_delim
+PNG_LIBS!$PNG_LIBS$ac_delim
 icu_config!$icu_config$ac_delim
 UNICODE_CFLAGS!$UNICODE_CFLAGS$ac_delim
 UNICODE_LIBS!$UNICODE_LIBS$ac_delim
@@ -26562,7 +26840,6 @@ ENABLE_DASHBOARD_SUPPORT_TRUE!$ENABLE_DASHBOARD_SUPPORT_TRUE$ac_delim
 ENABLE_DASHBOARD_SUPPORT_FALSE!$ENABLE_DASHBOARD_SUPPORT_FALSE$ac_delim
 ENABLE_OFFLINE_WEB_APPLICATIONS_TRUE!$ENABLE_OFFLINE_WEB_APPLICATIONS_TRUE$ac_delim
 ENABLE_OFFLINE_WEB_APPLICATIONS_FALSE!$ENABLE_OFFLINE_WEB_APPLICATIONS_FALSE$ac_delim
-ENABLE_DOM_STORAGE_TRUE!$ENABLE_DOM_STORAGE_TRUE$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -26604,6 +26881,7 @@ _ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+ENABLE_DOM_STORAGE_TRUE!$ENABLE_DOM_STORAGE_TRUE$ac_delim
 ENABLE_DOM_STORAGE_FALSE!$ENABLE_DOM_STORAGE_FALSE$ac_delim
 ENABLE_DATABASE_TRUE!$ENABLE_DATABASE_TRUE$ac_delim
 ENABLE_DATABASE_FALSE!$ENABLE_DATABASE_FALSE$ac_delim
@@ -26641,7 +26919,7 @@ LIBOBJS!$LIBOBJS$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 35; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 36; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff --git a/configure.ac b/configure.ac
index 8506ca9..212b4f4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -180,6 +180,36 @@ if test "$PKG_CONFIG" = "no"; then
    AC_MSG_ERROR([Cannot find pkg-config, make sure it is installed in your PATH])
 fi
 
+# Check for libpng the way Gtk+ does it
+AC_MSG_CHECKING(for libpng12)
+if $PKG_CONFIG --exists libpng12 ; then
+    AC_MSG_RESULT(yes)
+    PNG_LIBS=`$PKG_CONFIG --libs libpng12`
+else
+  AC_MSG_RESULT(no)
+  AC_CHECK_LIB(png, png_read_info,
+    [AC_CHECK_HEADER(png.h,
+      png_ok=yes,
+      png_ok=no)],
+    AC_MSG_ERROR([PNG library (libpng) not found]), -lz -lm)
+  if test "$png_ok" = yes; then
+    AC_MSG_CHECKING([for png_structp in png.h])
+    AC_TRY_COMPILE([#include <png.h>],
+      [png_structp pp; png_infop info; png_colorp cmap; png_create_read_struct;],
+      png_ok=yes,
+      png_ok=no)
+    AC_MSG_RESULT($png_ok)
+    if test "$png_ok" = yes; then
+      PNG_LIBS='-lpng -lz'
+    else
+      AC_MSG_ERROR([PNG library (libpng) not found])
+    fi
+  else
+   AC_MSG_ERROR([PNG library (libpng) not found])
+  fi
+fi
+AC_SUBST([PNG_LIBS])
+
 # determine the Unicode backend
 AC_MSG_CHECKING([the Unicode backend to use])
 AC_ARG_WITH(unicode_backend,
diff --git a/debian/changelog b/debian/changelog
index 93311be..3372f86 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,8 @@ webkit (1.0.2~pre.svn37878-1) UNRELEASED; urgency=low
   * debian/libwebkit-1.0-1.symbols: Add new symbols.
   * WebCore/page/gtk/AXObjectCacheAtk.cpp: printfs being removed upstream,
     we don't need to #include <stdio.h> anymore.
+  * configure.ac, configure, GNUmakefile.am, GNUmakefile.in: Properly check
+    and link against libpng. bz#21884.
 
  -- Mike Hommey <glandium at debian.org>  Sat, 25 Oct 2008 09:08:57 +0200
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list