aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar pl <pl@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-02-01 13:10:35 +0000
committerGravatar pl <pl@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-02-01 13:10:35 +0000
commit163a9edfa2e16fbd7ed6b4210176d4ef61cd9aab (patch)
tree157bfd6acf75e5cfcd9ae5743d4693b6795fa1c1
parent944200b2f8d5103eec48835e50ceead59e054728 (diff)
improved check for libpng/png.h: catch crappy build environment (png.h and
libpng.so version mismatch) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@4464 b3059339-0415-0410-9bf9-f77b7e298cf2
-rwxr-xr-xconfigure20
1 files changed, 17 insertions, 3 deletions
diff --git a/configure b/configure
index baca34c37a..f98c6e90c4 100755
--- a/configure
+++ b/configure
@@ -1863,6 +1863,7 @@ else
fi
echores "$_dvb"
+
echocheck "PNG support"
if test "$_png" = auto ; then
_png=no
@@ -1873,10 +1874,23 @@ if test "$_png" = auto ; then
else
cat > $TMPC << EOF
#include <png.h>
-int main(void) { return 0; }
+#include <string.h>
+int main(void) {
+ printf("png.h : %s\n", PNG_LIBPNG_VER_STRING);
+ printf("libpng: %s\n", png_get_libpng_ver(NULL));
+ return (strcmp(PNG_LIBPNG_VER_STRING, png_get_libpng_ver(NULL)));
+}
EOF
- cc_check -lpng -lz -lm && _png=yes
- echores yes
+ if cc_check -lpng -lz -lm ; then
+ if "$TMPO" >> "$TMPLOG" ; then
+ _png=yes
+ echores yes
+ else
+ echores "no (mismatch of library and header versions)"
+ fi
+ else
+ echores no
+ fi
fi
else
echores "$_png"