With autotools, --build
is what you are building on and --host
is what you want it to run on (there's also --target
, but that's only important if what you're compiling is itself a compiler). Autotools will generally figure out --build
on their own, so don't specify it if you don't have to (but look in /usr/lib/gcc
to see what your compiler probably thinks --build
should be)
So, eg, if you're building for i686 on x86_64, do
./configure --host=i686-linux-gnu
(And use the -m32
options in CFLAGS, etc., but it sounds like you already have that ready.)
Whereas if you're building for x86_64 on i686, do
./configure --host=x86_64-linux-gnu
(You can build for all kinds of crazy hosts: rs6000-ibm-aix, sparc-sun-solaris, mips-idt-ecoff, etc..., assuming you have the appropriate gcc cross-compilers installed...)
GNU's page on it is here:
http://www.gnu.org/software/automake/manual/html_node/Cross_002dCompilation.html