how to check for HAVE_FOO_PROTO ?

David Faure faure at kde.org
Sun Jan 15 01:33:57 CET 2006


On Saturday 14 January 2006 17:25, Alexander Neundorf wrote:
> Hi,
> 
> in kdelibs/ there are configure checks for really a lot of stuff.
> What does HAVE_FOO_PROTO mean ? (with FOO = GETHOSTNAME, INITGROUPS, MKDTEMP, 
> MKSTEMP, RANDOM and others)
> How should be tested for it ?
> 
> cmake has a check_function_exists(), which tries to compile and link a small 
> executable calling this function. But what should be done for 
> HAVE_FOO_PROTO ?

This is about the functions that libkdefakes can provide if the system doesn't.
If the system doesn't have it, there are still 2 cases : it has the prototype in a system header or it doesn't.
If it doesn't, then a file like config.h must provide it, hence the HAVE_FOO_PROTO check in the m4 implementation
 (which is used by the ifdefs in config.h.bot)
But if you prefer, read my bksys implementation of those checks in bksys/kdefakes.py
As you can see there, there is no need for the _PROTO intermediary if the configure
check directly writes out the prototype to the config-kdefakes.h file when it's needed.

-- 
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