mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-06 21:33:08 +00:00
Add option to disable ZLIB
This commit is contained in:
parent
9e6fa8ceb6
commit
1c59fe2e94
1 changed files with 29 additions and 18 deletions
47
configure.ac
47
configure.ac
|
|
@ -272,28 +272,39 @@ if test "$build_upnp" != "false" ; then
|
|||
fi
|
||||
|
||||
dnl check zlib
|
||||
PKG_CHECK_MODULES(ZLIB, [zlib], [found_zlib=yes], [found_zlib=no])
|
||||
if test "x$found_zlib" = "xno" ; then
|
||||
AC_CHECK_LIB(z, inflate,
|
||||
[AC_CHECK_HEADER([zlib.h],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[
|
||||
#include <zlib.h>
|
||||
#if !defined(ZLIB_VERNUM) || (ZLIB_VERNUM < 0x1230)
|
||||
// compile error
|
||||
#endif
|
||||
]],[])],
|
||||
[found_zlib=yes])])])
|
||||
AC_ARG_ENABLE(zlib,
|
||||
[AS_HELP_STRING([--disable-zlib], [Disable ZLib support])],
|
||||
[case "${enableval}" in
|
||||
yes) build_zlib=true ;;
|
||||
no) build_zlib=false ;;
|
||||
*) AC_MSG_ERROR(bad value ${enableval} for --disable-zlib) ;;
|
||||
esac],
|
||||
[build_zlib=auto]
|
||||
)
|
||||
if test "$build_zlib" != "false" ; then
|
||||
PKG_CHECK_MODULES(ZLIB, [zlib], [found_zlib=yes], [found_zlib=no])
|
||||
if test "x$found_zlib" = "xno" ; then
|
||||
AC_MSG_NOTICE([zlib library and headers not found])
|
||||
AC_CHECK_LIB(z, inflate,
|
||||
[AC_CHECK_HEADER([zlib.h],
|
||||
[AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[
|
||||
#include <zlib.h>
|
||||
#if !defined(ZLIB_VERNUM) || (ZLIB_VERNUM < 0x1230)
|
||||
// compile error
|
||||
#endif
|
||||
]],[])],
|
||||
[found_zlib=yes])])])
|
||||
if test "x$found_zlib" = "xno" ; then
|
||||
AC_MSG_NOTICE([zlib library and headers not found])
|
||||
else
|
||||
AC_DEFINE( HAVE_ZLIB, 1, [ZLIB support] )
|
||||
ZLIBS_LIBS='-z'
|
||||
AC_SUBST(ZLIB_LIBS)
|
||||
fi
|
||||
else
|
||||
AC_MSG_NOTICE([ZLIB found])
|
||||
AC_DEFINE( HAVE_ZLIB, 1, [ZLIB support] )
|
||||
ZLIBS_LIBS='-z'
|
||||
AC_SUBST(ZLIB_LIBS)
|
||||
fi
|
||||
else
|
||||
AC_MSG_NOTICE([ZLIB found])
|
||||
AC_DEFINE( HAVE_ZLIB, 1, [ZLIB support] )
|
||||
fi
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue