1
mirror of https://github.com/mpv-player/mpv synced 2024-08-04 14:59:58 +02:00

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
This commit is contained in:
pl 2002-02-01 13:10:35 +00:00
parent 944200b2f8
commit 163a9edfa2

20
configure vendored
View File

@ -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"