autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: recommended sequence to add libtool to an existing configure.ac


From: Zack Weinberg
Subject: Re: recommended sequence to add libtool to an existing configure.ac
Date: Thu, 6 Feb 2014 19:54:29 -0500

On Thursday, February 6, 2014, Ed Mansky <address@hidden> wrote:
>
>   Which of the macros :
>
> AC_CANCAONICAL_SYSTEM
>
> AC_CANONICAL_HOST
>
> AC_CANONICAL_BUILD
>
> AC_CANONICAL_TARGET
>
> should one use in a 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]