diff --git a/qb/config.libs.sh b/qb/config.libs.sh index 0bcd8dbf0e..3cf24ece08 100644 --- a/qb/config.libs.sh +++ b/qb/config.libs.sh @@ -288,10 +288,13 @@ if [ "$HAVE_OPENGL" != 'no' ] && [ "$HAVE_OPENGLES" != 'yes' ]; then fi fi -if [ "$OS" = 'Darwin' ]; then - check_lib ZLIB "-lz" -else +if [ "$HAVE_ZLIB" != 'no' ]; then check_pkgconf ZLIB zlib + + if [ "$HAVE_ZLIB" = 'no' ]; then + HAVE_ZLIB='auto' + check_lib ZLIB '-lz' + fi fi if [ "$HAVE_THREADS" != 'no' ]; then