6

I want to compile and build ffmpeg in my home folder since I don't have sudo privilege, but how to specify search directories for external libraries while running configure? I try to enable libx264, which is installed in my home folder instead of '/usr/local/', but

./configure --enable-libx264

returns me that libx264 can not be found.

How to tell configure that the libx264 is actually in /home/myusername/local/?

1 Answer 1

10

You need to specify extra CFLAGS and LDFLAGS to include the extra library locations:

$ configure --extra-ldflags="-L/path/to/extra/lib" --extra-cflags="-I/path/to/extra/includes"

should do it. You need to specify not the root folder of the libx264, but the folders within that where the compiled library and include files are respectively.

You can specify the -L and -I multiple times inside the quotes to specify multiple extra locations.

6
  • yes, it works, but '--extra-cflags="-I/path/to/extra/includes' should be '--extra-cflags="-I/path/to/extra/include'.
    – zhanwu
    Apr 13, 2011 at 20:19
  • I did want to add --extra-cflags=--static parameter, but in other hand I want to address h264 too. What should I do now?!
    – Dr.jacky
    Dec 8, 2015 at 7:28
  • Combine the two into one --extra-cflags with quotes as in my example and a space between the different parameters. --extra-cflags="-I/blah/blah/blah -static"
    – Majenko
    Dec 8, 2015 at 8:33
  • 1
    For me it doesn't find a anything and always tries to go by pkgconfig no matter what I try to do Oct 23, 2019 at 13:31
  • @Coldsteel48 did you find the solution to the pkgconfig issue?
    – rboy
    Feb 8 at 19:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .