[LLVMdev] include/Config/config.h discrepancies between CMake and autofoo builds

Óscar Fuentes ofv at wanadoo.es
Tue Jan 4 12:16:03 PST 2011


arrowdodger <6yearold at gmail.com> writes:

> Hello. I see many discrepancies in config.h file generated by CMake and
> autoheader.
>
> Most of them are following:
> In autofoo-generated config:
>
>> /* Define to 1 if you have the `<name>' function. */
>> #define HAVE_<name> 1
>>
> but in CMake-generated:
>
>> #undef HAVE_<name>
>>
> This happens because in config.h.cmake (config.h.in analog) these functions
> just are not checked for.

Right.

> Another difference:
> autofoo sets this by default:
>
>> #define ENABLE_PIC 1
>>
> while CMake not.
>
> There are many other differencies, which bother me, so here is the question:
> is it harmless and if not - should i try to fix it?

AFAIK a typical autoconf setup does not start from scratch. It reuses
scripts or templates taken from some other project or from autoconf
itself. This means that lots of stuff listed on config.h is not
actually used by the LLVM C++ sources. The macro ENABLE_PIC is one
example.

config.h.cmake was derived from config.h.in and not all tests were
implemented. It would be nice to test them all, just for the sake of
coherence. Or to say it with other words: patches welcome.



More information about the llvm-dev mailing list