Update:
I've added the needed files to the github repository below.
https://github.com/rodisbored/ffmpeg_x264_iOS5_build
I took gabriel's script and modified it. I've been meaning to post the complete script online, but here's the part(s) you need. Pop it into Gabriel's script. This works with XCode 4.2. I haven't updated to 4.3 to test whether the path names are still valid, but I think you can figure out where to update from the below.
For armv6
CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc ./configure --host=arm-apple-darwin --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk --prefix='dist' --extra-cflags='-arch armv6' --extra-ldflags='-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/system -arch armv6' --enable-pic --disable-asm --enable-static
For armv7
CC=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc ./configure --host=arm-apple-darwin --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk --prefix='dist' --extra-cflags='-arch armv7' --extra-ldflags='-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.0.sdk/usr/lib/system -arch armv7' --enable-pic --enable-static
To link these to ffmpeg, make sure you put the path of the library and and headers into the --extra-cflags and --extra-ldflags. If you don't, it'll complain about not finding the libx264 library. The below is what you need to turn this all on.
--enable-libx264 \
--enable-encoder=libx264 \
--enable-encoder=libx264rgb \
--enable-gpl