Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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/?

share|improve this question
up vote 3 down vote accepted

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.

share|improve this answer
yes, it works, but '--extra-cflags="-I/path/to/extra/includes' should be '--extra-cflags="-I/path/to/extra/include'. – zhanwu Apr 13 '11 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?! – Mr.Hyde Dec 8 '15 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 '15 at 8:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.