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

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

AC_SUBST usage to define include or linker flags


From: Pierre-Henri Trivier
Subject: AC_SUBST usage to define include or linker flags
Date: Thu, 22 Oct 2009 14:44:30 +0200

Greetings 

 I'm pretty new to Autotools, so sorry if the following is a FAQ.

I'm using macros from autoconf-archive mostly to check for the presence of libs and headers. 
I've noticed that some macros use AC_SUBST(..) to define XXX_CPPFLAGS, or XXX_INCLUDES, or XXX_LIBS symbols. As as understand it, the idea is that it makes it possible them in Makefile.am to write things like :

AM_CPPFLAGS=$(XXX_CPPFLAGS)

or

AM_LIBS=$(XXX_LIBS). 

(Which can be nice if different platform require different set of library to be linked against for the same package). 

However, not all m4 files do it, and not all of them use the same conventions. So my questions are : 

* 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".
* is there a "standard" convention to name them (eg "XXX_INCLUDES" vs "XXX_CPPFLAGS" ?)

Regards
Pierre-Henri

reply via email to

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