Mercurial > mplayer.hg
changeset 4463:2b6c3b1a9676
improved check for libpng/png.h: catch crappy build environment (png.h and
libpng.so version mismatch)
author | pl |
---|---|
date | Fri, 01 Feb 2002 13:10:35 +0000 |
parents | 3c556f8a4159 |
children | 89369725b561 |
files | configure |
diffstat | 1 files changed, 17 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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 <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"