autoconf-archive-maintainers
[Top][All Lists]
Advanced

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

Re: AC_SUBST usage to define include or linker flags


From: Dustin J. Mitchell
Subject: Re: AC_SUBST usage to define include or linker flags
Date: Thu, 22 Oct 2009 11:04:57 -0400

On Thu, Oct 22, 2009 at 8:44 AM, Pierre-Henri Trivier
<address@hidden> wrote:
> However, not all m4 files do it, and not all of them use the same
> conventions. So my questions are :

The archive has really only just started to get into the business of
defining conventions, and in fact this was one of the topics we have
been discussing.  The method you describe (XXX_INCLUDES, etc.) is,
IMHO, most flexible.  Macros which simply add their arguments to the
global CPPFLAGS, LIBS, etc. tend to over-link projects.  For example,
if one executable in a project requires libxslt, then only that
executable should be linked with XSLT_LIBS; but if the xslt macro puts
-lxslt in the global LIBS, then every executable ends up with an
unused dependency.

> * is it considered good pratice to use AC_SUBST to define such symbols ? If
> not, how are you supposed to transfer the information of "I found the
> include files, and they are in this folder" or "I found the lib, and it is
> in that folder".

Yes, AC_SUBST and AC_DEFINE are the main ways that autoconf scripts
communicate with the build process.

> * is there a "standard" convention to name them (eg "XXX_INCLUDES" vs
> "XXX_CPPFLAGS" ?)

That seems the most common.

Dustin

-- 
Open Source Storage Engineer
http://www.zmanda.com




reply via email to

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