I've been running around in circles trying to get xine-lib-1.2 built with external ffmpeg. I currently use 1.2 with CoreAVC and would like to explore the h.264 improvements in ffmpeg trunk.
I am suspecting my ffmpeg configuration/build/installation, but don't know what's wrong.
I have:
    Cleaned the libav* directories from /usr/local/include
Pulled a current SVN of ffmpeg :
    URL: svn://svn.mplayerhq.hu/ffmpeg/trunk
    Repository Root: svn://svn.mplayerhq.hu/ffmpeg
    Repository UUID: 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
    Revision: 15291

ffmpeg configure:
    ./configure --arch=i686 --cpu=athlon64 --enable-gpl --enable-postproc --enable-pthreads --enable-liba52 --enable-libmp3lame --enable-libvorbis

Builds sucessfully and the install places the following header directories in /usr/local/include:
    libavcodec    libavdevice    libavformat
    libavutil        libpostproc    libswscale

Xine-lib 1.2 from HG:
    changeset:   10649:650d69296d66
    date:        Fri Sep 05 18:02:23 2008 +0200

configured with:
 ./autogen.sh --with-external-ffmpeg
Nothing in this xine-lib has been patched yet (for vdr or CAVC) as I am trying to get the build
environment working properly before I mess with my CAVC patched version.

Compile fails with:

 gcc -DHAVE_CONFIG_H -I. -I../../../include -I../../.. -I../../../include -I../../../include -I../../../src
-I../../../src/xine-engine -I../../../src/xine-engine -I../../../src/xine-utils -I../../../src/input -I../../../src/input -I../../../lib
-I../../../lib -I/usr/local/include -I/usr/local/include -I../../../src/dxr3 -D_FILE_OFFSET_BITS=64 -DNDEBUG
-D_REENTRANT -DXINE_COMPILE -O3 -ffast-math -f expensive-optimizations -mtune=athlon
-fvisibility=hidden -pipe -Wall -Wformat=2 -Wno-format-zero-length -Wmissing-format-attribute
-Werror-implicit-function-declaration -Wstrict-aliasing=2 -Wchar-subscripts -Wmissing-declarations
-Wmissing-prototypes -Wwrite-strings -Wpointer-arith -g -MT ffmpeg_decoder.lo -MD -MP -MF
.deps/ffmpeg_decoder.Tpo -c ffmpeg_decoder.c  -fPIC -DPIC -o .libs/ffmpeg_decoder.o
mv -f .deps/ffmpeg_decoder.Tpo .deps/ffmpeg_decoder.Plo/bin/sh ../../../libtool --tag=CC  
--mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../include -I../../.. -I../../../include -I../../../include -I../../../src
-I../../../src/xine-engine -I../../../src/xine-engine -I../../../src/xine-utils  -I../../../src/input -I../../../src/input 
-I../../../lib -I../../../lib  -I/usr/local/include   -I/usr/local/include    -I../../../src/dxr3 -D_FILE_OFFSET_BITS=64
-DNDEBUG -D_REENTRANT -DXINE_COMPILE  -O3  -ffast-math -fexpensive-optimizations  -mtune=athlon
-fvisibility=hidden    -pipe  -Wall -Wformat=2 -Wno-format-zero-length -Wmissing-format-attribute
-Werror-implicit-function-declaration -Wstrict-aliasing=2 -Wchar-subscripts -Wmissing-declarations
-Wmissing-prototypes -Wwrite-strings -Wpointer-arith -g  -MT ff_audio_decoder.lo -MD -MP -MF
.deps/ff_audio_decoder.Tpo -c -o ff_audio_decoder.lo ff_audio_decoder.c
 gcc -DHAVE_CONFIG_H -I. -I../../../include -I../../.. -I../../../include -I../../../include -I../../../src
-I../../../src/xine-engine -I../../../src/xine-engine -I../../../src/xine-utils -I../../../src/input -I../../../src/input
 -I../../../lib -I../../../lib -I/usr/local/include -I/usr/local/include -I../../../src/dxr3 -D_FILE_OFFSET_BITS=64
-DNDEBUG -D_REENTRANT -DXINE_COMPILE -O3 -ffast-math -fexpensive-optimizations -mtune=athlon
-fvisibility=hidden -pipe -Wall -Wformat=2 -Wno-format-zero-length -Wmissing-format-attribute
-Werror-implicit-function-declaration -Wstrict-aliasing=2 -Wchar-subscripts -Wmissing-declarations
-Wmissing-prototypes -Wwrite-strings -Wpointer-arith -g -MT ff_audio_decoder.lo -MD -MP -MF
.deps/ff_audio_decoder.Tpo -c ff_audio_decoder.c  -fPIC -DPIC -o .libs/ff_audio_decoder.o

ff_audio_decoder.c: In function 'ff_audio_decode_data':
ff_audio_decoder.c:272: error: 'AVCodecContext' has no member named 'bits_per_sample'
ff_audio_decoder.c:325: error: implicit declaration of function 'avcodec_decode_audio'
ff_audio_decoder.c:330: error: 'AVCodecContext' has no member named 'bits_per_sample'
make[4]: *** [ff_audio_decoder.lo] Error 1
make[4]: Leaving directory `/usr/local/src/newtest/xine-lib-1.2/src/combined/ffmpeg'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/usr/local/src/newtest/xine-lib-1.2/src/combined/ffmpeg'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/newtest/xine-lib-1.2/src/combined'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/newtest/xine-lib-1.2/src'
make: *** [all-recursive] Error 1

xine-lib compiles fine without the external ffmpeg flag, and xine-lib-1.1.14 compiles with or without external ffmpeg using the same configure options.
I have tried adding CCPFLAGS directives like:
CPPFLAGS="-I/usr/local/include/libavcodec -I/usr/local/include/libavdevice -I/usr/local/include/libavformat  -I/usr/local/include/libavutil -I/usr/local/include/libpostproc"  ./autogen.sh --prefix=/usr/local  --disable-dxr3 --enable-shared --with-external-ffmpeg
and the result is the same
Your help is GREATLY appreciated as I have tried everything I know and everything I found
in searches over the last three days. I'm stumped.
-Todd