[FFmpeg-devel] [RFC]Use pkg-config as an alternative for x264 detection

Clément Bœsch u at pkh.me
Wed Jun 11 10:31:44 CEST 2014


On Wed, Jun 11, 2014 at 07:42:58AM +0000, Carl Eugen Hoyos wrote:
> Clément Bœsch <u <at> pkh.me> writes:
> 
> > > I did test my version, which also includes 
> > > the proper version check. 
> 
> I did not see your version, where can I find it?
> 

http://ffmpeg.org/pipermail/ffmpeg-devel/2014-May/157646.html


-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

> > > I'll apply mine if you don't mind.
> 
> Please do not change the default to pkg-config, 
> this will break build scripts and is therefore 
> not a good idea.
> 

I would do the other way around, even if I don't like that much:


-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
+                          || { require libx264 x264.h ... &&
check_cpp_condition ...

...which kind of defeats the purpose but well.

As I said in the mentioned thread, I would prefer having a better communication
with our users & downstreams.

> > Ah sorry I see what you did here, but that's 
> > not correct, because it will prefer the system 
> > version all the time and won't allow proper 
> > alternative build.
> 
> My patch is meant to fix detection of x264 if the 
> detection fails with the current configure code.
> It is not meant to replace the path-driven 
> general configure approach.

It's not a general configure approach. It's just that for historical reasons we
have a stack of more or less efficient ways of detecting libraries. And we have
for instance about 20 libraries are detected through pkg-config, which is not
"path-driven".

[...]

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140611/893ad7a5/attachment.asc>


More information about the ffmpeg-devel mailing list