Commit a77d6be3 authored by aviau's avatar aviau Committed by gerrit2

fix check for zlib

AC_CHECK_LIB was not correctly checking for the presence of zlib.
We use PKG_CHECK_MODULES instead to add -lz to libring_la_LDFLAGS.

Change-Id: Icfffb898030f886aae8c2c82dc5327f923f0f78e
Tuleap: #746
[stepan.salenikovich@savoirfairelinux.com: modified to use PKG_CHECK_MODULES and ZLIB_LIBS variable instead of -lz]
Signed-off: Stepan Salenikovich <stepan.salenikovich@savoirfairelinux.com>
parent 2f9f6b0d
......@@ -158,7 +158,6 @@ AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_C_VOLATILE
AC_CHECK_TYPES([ptrdiff_t])
AC_CHECK_LIB(zlib, zlib)
PKG_PROG_PKG_CONFIG()
......@@ -238,7 +237,7 @@ AS_IF([test -n "${CONTRIB_DIR}"], [
export PKG_CONFIG_PATH_CUSTOM
])
export PKG_CONFIG_PATH="${CONTRIB_DIR}/lib/pkgconfig:${CONTRIB_DIR}/lib64/pkgconfig:$PKG_CONFIG_PATH"
LDFLAGS="${LDFLAGS} -L${CONTRIB_DIR}/lib -lz"
LDFLAGS="${LDFLAGS} -L${CONTRIB_DIR}/lib"
AS_IF([test "${SYS}" = "darwin"], [
export LD_LIBRARY_PATH="${CONTRIB_DIR}/lib:$LD_LIBRARY_PATH"
......@@ -258,6 +257,9 @@ AS_IF([test -d "${TOOLS_DIR}"], [
export PATH="${TOOLS_DIR}":$PATH
])
dnl Check for zlib
PKG_CHECK_MODULES(ZLIB, zlib,, AC_MSG_ERROR([zlib not found]))
dnl Check for pjproject
PKG_CHECK_MODULES(PJPROJECT, libpjproject,, AC_MSG_ERROR([Missing pjproject files]))
......
......@@ -54,6 +54,7 @@ libring_la_LDFLAGS = \
@PORTAUDIO_LIBS@ \
@GNUTLS_LIBS@ \
@OPENDHT_LIBS@ \
@ZLIB_LIBS@ \
$(PCRE_LIBS)
if HAVE_OSX
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment