Teee Teee - 2 months ago 17
C++ Question

How do I use a sysroot with autoconf?

I am trying to cross-compile fontconfig for a ARM device. I've got a sysroot with all the dependencies etc. Fontconfig uses autoconfig so I did this:

./autogen.sh --host="arm-arm1176jzs-linux-gnueabi" \
--sysconfdir="${SYSROOT}etc" \
--prefix="${PREFIX}" \
--localstatedir="${SYSROOT}var" \
--disable-docs


However, there is no flag like
--sysroot
so how do I pass my sysroot to autoconfig ?

Answer

I guess you set $CC to your cross-compiler's path. You can easily add some flags:

export CC=gcc --sysroot=/path/to/sysroot

Note that this works with all tools so keep it in mind ;)