Autotools, targets and hosts

Following my posts about autotools improvements, I’d like to write a short post about another quite often misused macro provided by autoconf, that I had to fix in lscube too.

The macro in question is AC_CANONICAL_TARGET, which is used to provide the --host/--build and --target options to ./configure. What is the problem with that macro? Well in most cases you don’t want it at all, and you want to use, if anything, AC_CANONICAL_HOST (which is not even needed, for most cases) that only provides --host and --build options.

Why is this? Well, the problem is that the --target option is used only for compilers and other tools generating machine-dependent code. The meaning of the three names are as follows:

Exit mobile version