A recent svn checkout on a Centos 5.5 x86_64 of ffmpeg refused to link. It complained:
libavcodec.so: undefined reference to `x264_encoder_open_104'
The fix was as simple as
LD_LIBRARY_PATH=/usr/lib
export LD_LIBRARY_PATH
before ./configure. In a weird way it makes even sense.