Misleading configure error when static zlib is missing
When the static version of libpng
is installed, but the static version of zlib
is not installed. configure
prints a misleading error message:
checking for LIBPNG... yes
checking for ZLIB... yes
configure: error: static libpng not found
config.log
, however, shows the real error:
configure:4721: x86_64-w64-mingw32-gcc -o conftest.exe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions --param=ssp-buffer-size=4 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/libpng16 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -Wall -static conftest.c -L/usr/x86_64-w64-mingw32/sys-root/mingw/lib -lpng16 -lz >&5
/usr/lib/gcc/x86_64-w64-mingw32/9.2.1/../../../../x86_64-w64-mingw32/bin/ld: cannot find -lz
collect2: error: ld returned 1 exit status