mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-24 11:54:01 +00:00
configure: try to detect zlib simply via -lz if no pkg-config module installed for it
This can happen e.g. on Mac OS.
This commit is contained in:
parent
86ee6ce6a9
commit
cbdef0301a
15
ac/zlib.m4
15
ac/zlib.m4
@ -2,7 +2,20 @@ dnl
|
||||
dnl Check for zlib
|
||||
dnl
|
||||
|
||||
PKG_CHECK_MODULES([ZLIB],[zlib],[zlib_found=yes])
|
||||
PKG_CHECK_EXISTS([zlib],[zlib_found=yes],[zlib_found=no])
|
||||
if test x"$zlib_found" = xyes; then
|
||||
PKG_CHECK_MODULES([ZLIB],[zlib],[zlib_found=yes])
|
||||
else
|
||||
AC_MSG_CHECKING(for ZLIB)
|
||||
save_LIBS="$LIBS"
|
||||
LIBS="$LIBS -lz"
|
||||
AC_TRY_LINK(
|
||||
[#include <zlib.h>],
|
||||
[inflate(0, 0);],
|
||||
[zlib_found=yes; ZLIB_LIBS=-lz])
|
||||
LIBS="$save_LIBS"
|
||||
AC_MSG_RESULT($zlib_found)
|
||||
fi
|
||||
|
||||
if test x"$zlib_found" != xyes; then
|
||||
AC_MSG_ERROR([Could not find the zlib library])
|
||||
|
Loading…
Reference in New Issue
Block a user