[FFmpeg-devel] [PATCH] build: rely on pkg-config for libx264 probing.

Clément Bœsch u at pkh.me
Tue Dec 17 14:40:05 CET 2013


From: Clément Bœsch <clement at stupeflix.com>

This helps populating {c,ld}flags properly without manual user
intervention.

x264 needs to be built with either --bit-depth=8 or --bit-depth=10. Most
distro package the former, so users often have to build their own and
install it in a separated place. Instead of having them to require
--extra-ldflags and --extra-cflags, we can now use pkg-config utils to
append them automatically.

before:
  ./configure --enable-gpl --enable-libx264 --extra-cflags="-I/usr/local/include" --extra-ldflags="-L/usr/local/lib"
after:
  PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure --enable-gpl --enable-libx264

Trolled-on Ticket #3218
---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index 3c6d766..0f09310 100755
--- a/configure
+++ b/configure
@@ -4434,7 +4434,7 @@ enabled libvpx            && {
     enabled libvpx_vp9_decoder && { check_lib2 "vpx/vpx_decoder.h vpx/vp8dx.h" "vpx_codec_vp9_dx" -lvpx || disable libvpx_vp9_decoder; }
     enabled libvpx_vp9_encoder && { check_lib2 "vpx/vpx_encoder.h vpx/vp8cx.h" "vpx_codec_vp9_cx VP9E_SET_SVC" -lvpx || disable libvpx_vp9_encoder; } }
 enabled libwavpack        && require libwavpack wavpack/wavpack.h WavpackOpenFileOutput  -lwavpack
-enabled libx264           && require libx264 x264.h x264_encoder_encode -lx264 &&
+enabled libx264           && require_pkg_config x264 "stdint.h x264.h" x264_encoder_encode &&
                              { check_cpp_condition x264.h "X264_BUILD >= 118" ||
                                die "ERROR: libx264 must be installed and version must be >= 0.118."; }
 enabled libxavs           && require libxavs xavs.h xavs_encoder_encode -lxavs
-- 
1.8.5.1



More information about the ffmpeg-devel mailing list