diff mbox

[FFmpeg-devel] configure: add pkg-config check for zlib

Message ID 20180505191244.4414-1-jeebjp@gmail.com
State Accepted
Commit 8d1263fa199ff6dcfc8f0cc94f15f3b429d0c276
Headers show

Commit Message

Jan Ekström May 5, 2018, 7:12 p.m. UTC
It exists, so why not use it? Helps one get rid of additional
search path related flags in addition to PKG_CONFIG_{PATH,LIBDIR}
when utilizing a cross-prefix separate from the sysroot.
---
 configure | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

James Almer May 6, 2018, 4:41 p.m. UTC | #1
On 5/5/2018 4:12 PM, Jan Ekström wrote:
> It exists, so why not use it? Helps one get rid of additional
> search path related flags in addition to PKG_CONFIG_{PATH,LIBDIR}
> when utilizing a cross-prefix separate from the sysroot.
> ---
>  configure | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/configure b/configure
> index f78853cc6c..2d99c8ea85 100755
> --- a/configure
> +++ b/configure
> @@ -5933,7 +5933,8 @@ if ! disabled pthreads && ! enabled w32threads && ! enabled os2threads; then
>      fi
>  fi
>  
> -enabled  zlib && check_lib zlib   zlib.h      zlibVersion    -lz
> +enabled  zlib && { check_pkg_config zlib zlib "zlib.h" zlibVersion ||
> +                   check_lib zlib   zlib.h      zlibVersion    -lz; }
>  enabled bzlib && check_lib bzlib bzlib.h BZ2_bzlibVersion    -lbz2
>  enabled  lzma && check_lib lzma   lzma.h lzma_version_number -llzma

LGTM.
Jan Ekström May 6, 2018, 5:50 p.m. UTC | #2
On Sun, May 6, 2018 at 7:41 PM, James Almer <jamrial@gmail.com> wrote:
>
> LGTM.

Thanks, pushed.
diff mbox

Patch

diff --git a/configure b/configure
index f78853cc6c..2d99c8ea85 100755
--- a/configure
+++ b/configure
@@ -5933,7 +5933,8 @@  if ! disabled pthreads && ! enabled w32threads && ! enabled os2threads; then
     fi
 fi
 
-enabled  zlib && check_lib zlib   zlib.h      zlibVersion    -lz
+enabled  zlib && { check_pkg_config zlib zlib "zlib.h" zlibVersion ||
+                   check_lib zlib   zlib.h      zlibVersion    -lz; }
 enabled bzlib && check_lib bzlib bzlib.h BZ2_bzlibVersion    -lbz2
 enabled  lzma && check_lib lzma   lzma.h lzma_version_number -llzma