Thanks Zack, this helps clarify the issue a lot.
--Ed
On Thursday, February 6, 2014, Ed Mansky
<<mailto:man...@mindspring.com>man...@mindspring.com> wrote:
Which of the macros :
AC_CANCAONICAL_SYSTEM
AC_CANONICAL_HOST
AC_CANONICAL_BUILD
AC_CANONICAL_TARGET
should one use in a <http://configure.ac>configure.ac ?
First, all of these are to be avoided: use them only when there's no
way to write a feature test instead.
Then, in most cases where you do need them, you should only need
AC_CANONICAL_HOST. That is the one that detects the identity of the
system your program will run on, which is what you normally care
about. _BUILD is different from _HOST only when your program is
being cross compiled, in which case it tells you the identity of the
system where the compiler is running. You would need to use this
only if you need to compile and run programs *on the build system*
in order to build your program (custom code generators, for
instance) *and* those programs themselves contain system-specific
logic. _TARGET is even less often needed: it differs from _HOST only
when you are *building a cross compiler* (or assembler or other tool
chain component), in which case it identifies the system your
program is to generate code for.
_SYSTEM is an obsolete synonym for _HOST, iirc. (or possibly _HOST+_BUILD)
zw
--
E. J. Mansky II
Eikonal Research Institute
Bend, Oregon
_______________________________________________
Autoconf mailing list
Autoconf@gnu.org
https://lists.gnu.org/mailman/listinfo/autoconf