[Top][All Lists]

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

Re: Where Do All These Macros Come From?

From: Jordan H.
Subject: Re: Where Do All These Macros Come From?
Date: Fri, 24 May 2013 08:26:17 -0700

Right. I understand that much. My question is about autoconf (sorry 
about saying auto*make*). I see a lot of macros that tutorial authors 
use for which I don't see any documentation. Are they customized for 
that project? Where are they defined? I'm coming from a Makefile 
background (like most everyone). I'm used to having something like this:

    CPPFLAGS=-g -std=c++0x

    all: some_target
        # blah blah blah...

However, with autoconf I find macros are defined like this:


Alright, cool. I can get used to this syntax. How does autoconf know 
what SOME_MACRO is and how to use it in generating a `configure` 
script? I found a list of macros in the automake manual 
(the auto*conf* section) but I see a lot of macros that people use that 
are not on the list or nowhere previously defined. How is this 
possible? I'm sorry...I'm really confused here.

On Fri 24 May 2013 07:28:17 AM PDT, Paul Smith wrote:
> On Fri, 2013-05-24 at 07:25 -0700, Jordan H. wrote:
>> Hello, folks!
>> In learning automake I keep looking at example files and in
>> the tutorial someone says "oh, you can just use this here macro." I look
>> in the automake manual, though
>> (
>> and find the macro to not be found. One example is AC_CHECK_LIB that's
>> automatically generated by autoscan...I see very little documentation on
>> this macro.
>> Is there a special syntax for This is never really
>> explained in any tutorial. All I see is someone pulling a variable out
>> from who-knows-where and a different tutorial doing the exact same thing
>> pulls a different macro from who-know-where.
>> Thanks. Hope my question is clear. I'm still sort of a newbie with automake.
> Your problem is that your confusing automake and autoconf.
> Automake is the tool that manages makefiles: it turns a file
> into a file.
> Autoconf is the tool that manages configuration: it turns a
> file into the configure script.
> When your user runs the configure script, one of the things it does is
> convert the file to a normal Makefile.
> As a general rule, the autoconf macros that begin with "AM_" are
> automake macros.  The macros that begin with "AC_" are autoconf macros,
> and you need to read the autoconf documentation to learn about those.

reply via email to

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