I am sorry, expat doesn't install a pkg-config file. So the above directions may help with other packages, it won't for expat.
Here is the rest of what I used which allows dbus to install in the cross compiled system.
Here is what expat looks like in my system (this is much later in my build, the firefox versions probably aren't present in yours):
Code:
>> find ${target} -name "*expat*"
${target}/usr/include/expat.h
${target}/usr/include/firefox-2.0.0.15/expat
${target}/usr/include/firefox-2.0.0.15/expat/expat.h
${target}/usr/include/firefox-2.0.0.15/expat/expat_config.h
${target}/usr/include/expat_external.h
${target}/usr/share/doc/libxml2-2.6.31/html/tutorial/includexpath.c
${target}/usr/lib/libexpat.so.1
${target}/usr/lib/libexpat.so
${target}/usr/lib/libexpat.a
${target}/usr/lib/libexpat.so.1.5.2
For building dbus, I have the following for CFLAGS and LDFLAGS:
Code:
>> echo $CFLAGS
-O2 -march=i586 -fomit-frame-pointer -s -I${target}${XORG_PREFIX}/include -I${target}${XORG_PREFIX}/include/xorg -I${target}${XORG_PREFIX}/include/X11 -I${target}/usr/include/X11 -I${target}/usr/include -I/usr/include/c++/4.2.4/i586-pc-linux-gnu -I/tools/lib/gcc/i586-pc-linux-gnu/4.2.4/include
>> echo $LDFLAGS
-s -L${target}${XORG_PREFIX}/lib -Wl,--rpath -Wl,${target}${XORG_PREFIX}/lib -L${target}/usr/lib -Wl,--rpath -Wl,${target}/usr/lib
So, the compiler has include paths which contain expat.h and the linker has paths which contain libexpat.so. I have marked the particular paths above in bold. I found this was the only way to get most packages to compile, as individually adding configure override flags quickly got out of hand, and a number of configure scripts only partially support their override flags.
Also note that the ${target} locations are first in CFLAGS. If you have to include build system include locations as I did, they should be last. The compiler searches through the include paths until it finds the desired file, so if there are multiple copies, the first location found is the version used.