Is this with a current external ffmpeg library? With that I had a similar problem, and fixed it like so:
Code:
$ FFMPEG_LIBS="-L/usr/local/lib -lavcodec -lavformat -lavutil" ./autogen.sh --with-external-ffmpeg
... using your ffmpeg library path, which is /usr/local/lib here.