[vlc-devel] [PATCH 1/2] configure.ac: use pkg-config for zlib

Steve Lhomme robux4 at ycbcr.xyz
Fri Sep 27 08:23:31 CEST 2019


It would be nice but I'm not sure it has a pkg-config file in the oldest 
distros we support (and what about macOS ?).

The good side is that we could require a recent version when we know old 
ones are too broken.

On 2019-09-26 16:08, Alexandre Janniaux wrote:
> ---
>   configure.ac | 15 +++++++++------
>   1 file changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 210b4ca5371..1a9d30c14ca 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -933,13 +933,16 @@ AS_IF([test -n "${PKG_CONFIG}" ],[
>   dnl
>   dnl Check for zlib.h and -lz if available
>   dnl
> -AC_CHECK_HEADERS([zlib.h], [ have_zlib=yes ], [ have_zlib=no ])
> -AM_CONDITIONAL([HAVE_ZLIB], [ test "${have_zlib}" = "yes" ])
> -if test "${have_zlib}" = "yes"
> -then
> -  VLC_ADD_LIBS([sap],[-lz])
> -fi
>   
> +have_zlib = "no"
> +PKG_CHECK_MODULES(ZLIB, [zlib], [
> +  VLC_ADD_CFLAGS([sap],[${ZLIB_CFLAGS}])
> +  VLC_ADD_LIBS([sap],[${ZLIB_LIBS}])
> +  have_zlib = "yes"
> +], [
> +    AC_MSG_WARN(["ZLIB not found: ${ZLIB_PKG_ERRORS}"])
> +])
> +AM_CONDITIONAL([HAVE_ZLIB], [ test "${have_zlib}" = "yes" ])
>   
>   dnl
>   dnl Domain name i18n support via GNU libidn
> -- 
> 2.23.0
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> 


More information about the vlc-devel mailing list