Here's an autoconf-compatible and much, much shorter configure system that isn't expanded from macros and remembers that bash has functions. Look, you can actually maintain it!
echo "This configure script requires a POSIX-compatible shell"
echo "such as bash or ksh."
echo "THIS IS NOT A BUG IN LIBAV, DO NOT REPORT IT AS SUCH."
Most of libav's configure script is dependency trees for all the codecs flags you can turn on/off, so it's quite compact without it. x264 reuses it at 1500 lines:
http://git.libav.org/?p=libav.git;a=blob;f=configure;h=9f836...
http://git.libav.org/?p=libav.git;a=blob;f=Makefile;h=4e026b...
The new thing seems to be generating configure from CMake which requires you to get a Ph.D to figure out how to override $CC.