Cross-compilation how-to

To run the configure script for cross-compilation:

Launch the configure script as follows:

CC=${CROSS_COMPILER_PATH}/bin/gcc ./configure --prefix=/tmp/123 --host=<ARCH>
where <ARCH> is the target architecture, e.g. arm-linux-gnueabihf.

Alternatively, edit configure and find this line:

Change no to yes. Note that in the configure script, one can also find the following code snippet:
if test "x$host_alias" != x; then
  if test "x$build_alias" = x; then
  elif test "x$build_alias" != "x$host_alias"; then
Anyway, make sure cross_compiling is set to no.

Autoconf creation how-to

Commands to create configure and
  1. $ aclocal
    From and, it generates aclocal.m4.
  2. $ autoconf -v -f
    It generates configure script.
  3. $ touch AUTHORS NEWS README ChangeLog
  4. Above files must be present or automake will complain.
  5. $ libtoolize -v -f
  6. This copies/links a few support scripts, including
  7. $ autoheader -v -f
  8. This creates
  9. $ automake -a -f
  10. This creates
All done!

Another simpler way to create configure and

$ autoreconf -vif