# HG changeset patch # User pl # Date 1012569035 0 # Node ID 2b6c3b1a96767f6e20070235ade7ec80fac41ce5 # Parent 3c556f8a4159eb986c8336738c6646c6053d772d improved check for libpng/png.h: catch crappy build environment (png.h and libpng.so version mismatch) diff -r 3c556f8a4159 -r 2b6c3b1a9676 configure --- a/configure Fri Feb 01 11:41:38 2002 +0000 +++ b/configure Fri Feb 01 13:10:35 2002 +0000 @@ -1863,6 +1863,7 @@ fi echores "$_dvb" + echocheck "PNG support" if test "$_png" = auto ; then _png=no @@ -1873,10 +1874,23 @@ else cat > $TMPC << EOF #include -int main(void) { return 0; } +#include +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"