[FFmpeg-devel] Adding require_pkg_config when libx264 is enabled

forumhelp forum helpforum2011 at hotmail.com
Sun Jan 22 13:27:10 CET 2012





Hello,

I am trying to build ffmpeg in windows, I encounter a problem whenn I try to compile using --enable-libx264.
Also I have x264 the library and include file in a special directory (not /usr/local/).
By reading configure file I fugured out that when libx264 is enabled, it doesn't check the required pkg config.

So I changed in the configure file

enabled libx264     && require  libx264 x264.h x264_encoder_encode -lx264 &&
                  { check_cpp_condition x264.h "X264_BUILD >= 118" ||
                      die "ERROR: libx264 version must be >= 0.118."; }
to 
enabled libx264     && require_pkg_config x264 x264.h x264_encoder_encode &&
            require  libx264 x264.h x264_encoder_encode -lx264 &&
                  { check_cpp_condition x264.h "X264_BUILD >= 118" ||
                      die "ERROR: libx264 version must be >= 0.118."; }

I don't know if it's the right way to do it for all the configurations but it worked for me.
The command line to launch the configure file:
    ./configure  --cross-prefix=x86_64-w64-mingw32- --enable-shared --disable-static \
--enable-cross-compile --target-os=mingw32 --arch=x86_64 --enable-gpl \
--enable-libx264 


Hope this may help other
Zouhair


 		 	   		  


More information about the ffmpeg-devel mailing list