Using config_xxx.h instead of -DHAVE_XXX

Michael Meeks michael.meeks at suse.com
Sat Dec 8 14:24:40 PST 2012


Hi Lubos,

On Fri, 2012-12-07 at 18:42 +0100, Lubos Lunak wrote:
> currently our build system adds -DHAVE_XXX options to the compile command 
> line for various settings, which does not quite scale, and does not cause 
> relevant files to rebuild, so the common practice nowadays is to use config.h 
> file(s).

	Agreed.

>  There are more such -D options that could be changed, although with some it'd 
> be better be careful, e.g. OSL_DEBUG can't go there, because it can be 
> overriden by command-line, and I'm not sure if adding #include 
> <config_global.h> to sal/config.h would be really included everywhere where 
> needed.

	Personally I love it :-) I've wanted to have the bandwidth to work on
this for years. I also really like the separation of module specific
configure settings to avoid some catastrophic cascade of badness when
re-configured with fairly minor differences in options (re-running
autogen.sh regularly is really normal). I assume the AC_DEFINE magic
uses autoconf's existing ability to detect and avoid changing timestamps
where there is no difference in the header.

	So - modulo some bikeshed over where to put the config.h's I think it's
great.

	Some care/thought should be given to ensuring that the URE/ODK still
exports whatever limited set of these defines we need [ to be fair the
ODK needs some real dunging out action - and should have it's samples
built as we compile to stop it from bit-rotting too but ... ].

	So; love it ;-)

	Nice work,

		Michael.

-- 
michael.meeks at suse.com  <><, Pseudo Engineer, itinerant idiot



More information about the LibreOffice mailing list