title: How to configure linking so that compiled binary finds libraries?
body: <p>I'm compiling <code>ffmpeg</code>. Configuration:</p>
  
  <p><code>
    --prefix=/home/john/zope/engage/zeocluster/ffmpeg/parts/ffmpeg-build
    --extra-cflags='-I/home/john/zope/engage/zeocluster/ffmpeg/parts/x264-build/include
    -I/home/john/zope/engage/zeocluster/ffmpeg/parts/ogg-build/include
    -I/home/john/zope/engage/zeocluster/ffmpeg/parts/theora-build/include
    -I/home/john/zope/engage/zeocluster/ffmpeg/parts/lame-build/include
    -I/home/john/zope/engage/zeocluster/ffmpeg/parts/faac-build/include
    -I/home/john/zope/engage/zeocluster/ffmpeg/parts/faad-build/include
    -I/home/john/zope/engage/zeocluster/ffmpeg/parts/vpx-build/include
    -I/home/john/zope/engage/zeocluster/ffmpeg/parts/vorbis-build/include
    -I/home/john/zope/engage/zeocluster/ffmpeg/parts/ffmpeg-build/include'
    --extra-ldflags='-L/home/john/zope/engage/zeocluster/ffmpeg/parts/x264-build/lib
    -L/home/john/zope/engage/zeocluster/ffmpeg/parts/ogg-build/lib
    -L/home/john/zope/engage/zeocluster/ffmpeg/parts/theora-build/lib
    -L/home/john/zope/engage/zeocluster/ffmpeg/parts/lame-build/lib
    -L/home/john/zope/engage/zeocluster/ffmpeg/parts/faac-build/lib
    -L/home/john/zope/engage/zeocluster/ffmpeg/parts/faad-build/lib
    -L/home/john/zope/engage/zeocluster/ffmpeg/parts/vpx-build/lib
    -L/home/john/zope/engage/zeocluster/ffmpeg/parts/vorbis-build/lib
    -L/home/john/zope/engage/zeocluster/ffmpeg/parts/ffmpeg-build/lib'
  </code></p>
  
  <p>The build completes fine, and <code>LD_LIBRARY_PATH=./parts/ffmpeg-build/lib:./parts/x264-build/lib ./parts/ffmpeg-build/bin/ffmpeg</code> runs the binary.</p>
  
  <p>Why is that <code>LD_LIBRARY_PATH</code> necessary? Didn't I already tell the compiler to link against these libraries? </p>