这是pkgconfig 官方, 给出的使用pkg-config 配置交叉编译环境的方法.
http://pkgconfig.freedesktop.org/wiki/CrossCompileProposal
1.
现阶段还不能直接通过 --host 参数控制交叉编译过程中链接的package路径.
只能通过$PKG_CONFIG_PATH 或 $PKG_CONFIG_LIBDIR.
1.1
Note that when specifying PKG_CONFIG_LIBDIR, pkg-config will completely ignore the content in PKG_CONFIG_PATH, even if the documentation states different things.
我的做法是在交叉编译的时候使用
export PKG_CONFIG_LIBDIR=/nfsroot/arm-xscale-linux-gnu/steven_root/pkgconfig
1.2.
In a cross compile situation, some .pc files on the system will be for the build machine and some will be for the target