From: Rui Maciel on
I've started toying around with the GNU build system (a.k.a. autotools) and I'm having trouble
understanding how to use the config.h file. The thing is, it appears that the ./configure
script creates the config.h file in the directory in which it has been ran, which means that
there is no guarantee where the config.h file will be placed, which may constitute a problem
if the source code is written with a specific path to that file.

So, how do you use the config.h file?


Thanks in advance,
Rui Maciel
From: Pascal J. Bourguignon on
Rui Maciel <rui.maciel(a)gmail.com> writes:

> I've started toying around with the GNU build system
> (a.k.a. autotools) and I'm having trouble understanding how to use
> the config.h file. The thing is, it appears that the ./configure
> script creates the config.h file in the directory in which it has been
> ran, which means that there is no guarantee where the config.h file
> will be placed, which may constitute a problem if the source code is
> written with a specific path to that file.
>
> So, how do you use the config.h file?

You're asking the wrong question.

The right question to ask, is in what directory should you run
configure, so that the right config.h file is created, the config.h file
that is included by the rest of the program.


--
__Pascal Bourguignon__
From: Rui Maciel on
Pascal J. Bourguignon wrote:

> You're asking the wrong question.
>
> The right question to ask, is in what directory should you run
> configure, so that the right config.h file is created, the config.h file
> that is included by the rest of the program.

I don't believe that that is the question. Running multiple parallel build trees is a widely
adopted practice, which is even covered in books dedicated to the GNU build tools[1].


Rui Maciel


[¹]http://www.sourceware.org/autobook/autobook/autobook_274.html
From: Pascal J. Bourguignon on
Rui Maciel <rui.maciel(a)gmail.com> writes:

> Pascal J. Bourguignon wrote:
>
>> You're asking the wrong question.
>>
>> The right question to ask, is in what directory should you run
>> configure, so that the right config.h file is created, the config.h file
>> that is included by the rest of the program.
>

> I don't believe that that is the question. Running multiple parallel
> build trees is a widely adopted practice, which is even covered in
> books dedicated to the GNU build tools[1].

Hence your need to know in which directory you have to generate each
config.h files for each parallel build!



> [�]http://www.sourceware.org/autobook/autobook/autobook_274.html

--
__Pascal Bourguignon__