[FFmpeg-devel] [PATCH 2/3] build: rely on pkg-config for libx264 probing

Clément Bœsch u at pkh.me
Tue Jun 17 23:05:39 CEST 2014


---
 Changelog         | 2 ++
 configure         | 4 +---
 doc/encoders.texi | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Changelog b/Changelog
index 40a7751..268205c 100644
--- a/Changelog
+++ b/Changelog
@@ -54,3 +54,5 @@
  │ ⚠  Behaviour changes       │
  └────────────────────────────┘
 
+  • libx264 is now detected through pkg-config.
+
diff --git a/configure b/configure
index 4f909a0..6946133 100755
--- a/configure
+++ b/configure
@@ -4731,9 +4731,7 @@ enabled libvpx            && {
     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 libwebp           && require_pkg_config libwebp webp/encode.h WebPGetEncoderVersion
-enabled libx264           && require libx264 x264.h x264_encoder_encode -lx264 &&
-                             { check_cpp_condition x264.h "X264_BUILD >= 118" ||
-                               die "ERROR: libx264 must be installed and version must be >= 0.118."; }
+enabled libx264           && require_pkg_config "x264 >= 0.118" "stdint.h x264.h" x264_encoder_encode
 enabled libx265           && require_pkg_config x265 x265.h x265_encoder_encode &&
                              { check_cpp_condition x265.h "X265_BUILD >= 17" ||
                                die "ERROR: libx265 version must be >= 17."; }
diff --git a/doc/encoders.texi b/doc/encoders.texi
index 2781574..3183027 100644
--- a/doc/encoders.texi
+++ b/doc/encoders.texi
@@ -1515,7 +1515,7 @@ x264 H.264/MPEG-4 AVC encoder wrapper.
 
 This encoder requires the presence of the libx264 headers and library
 during configuration. You need to explicitly configure the build with
- at code{--enable-libx264}.
+ at code{--enable-libx264}. This library is detected through @code{pkg-config}.
 
 libx264 supports an impressive number of features, including 8x8 and
 4x4 adaptive spatial transform, adaptive B-frame placement, CAVLC/CABAC
-- 
2.0.0



More information about the ffmpeg-devel mailing list