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

Marvin Scholz epirat07 at gmail.com
Fri Sep 27 11:10:33 CEST 2019


On 27 Sep 2019, at 8:23, Steve Lhomme wrote:

> 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.

Yes macOS ships a zlib and has no pkgconfig files for this, but we
anyway build zlib from contribs on macOS for VLC.

>
> 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
>>
> _______________________________________________
> 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