Need help on HAVE_SMTH stuff ;)

David Faure faure at kde.org
Sun Apr 23 21:36:50 CEST 2006


On Sun, Apr 23, 2006 at 05:08:14PM +0200, Thiago Macieira wrote:
> Dmitry Suzdalev wrote:
> >There's a bunch of
> >#if HAVE_ARTS
> >...
> >#endif
> 
> They were defined to either 0 or 1 in KDE3. That's why there wasn't a 
> problem.

In general, no, HAVE_FOO was undefined or set to 1. That's how most configure
checks did it, at least, but maybe HAVE_ARTS was different.

> Feel free to change them to:
> #if defined(HAVE_ARTS) && HAVE_ARTS

In general, for KDE4, I would quite like if we could do
#if HAVE_FOO
and get a warning if HAVE_FOO isn't set at all because config.h
(or config-foo.h) wasn't included.

But this would require
1) a way for #cmakedefine to work that way (i.e. defining to 0 if not
set instead of undefining) - either as an option or with another name
than cmakedefine, of course, to preserve compatibility.
2) changing all the kde code that uses ifdef.

In the long run this would be really nice because the pre-compiler would
warn us when we forget to include the file that defines this HAVE_FOO symbol...

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).


More information about the Kde-buildsystem mailing list