qconf support for HAVE_SYS_FILIO_H and MLOCK_NOT_VOID_PTR

svn path=/trunk/kdesupport/qca/; revision=700608
This commit is contained in:
Justin Karneges 2007-08-16 00:44:26 +00:00
parent 66e4948614
commit dbc0d0647f

View File

@ -30,6 +30,27 @@ public:
QString str;
QFile f;
// HAVE_SYS_FILIO_H
if(conf->findHeader("sys/filio.h", QStringList(), &str))
{
if(!str.isEmpty())
conf->addIncludePath(str);
conf->addDefine("HAVE_SYS_FILIO_H");
}
// MLOCK_NOT_VOID_PTR
str =
"# include <stdlib.h>\n"
"# include <sys/mman.h>\n"
"int main() { void *f = 0; return mlock(f,8); }\n";
if(!conf->doCompileAndLink(str, QStringList(), QString(), QString()))
{
conf->debug("mlock(2) does not take a void *");
conf->addDefine("MLOCK_NOT_VOID_PTR");
}
str = QString();
if(conf->getenv("QC_DISABLE_TESTS") == "Y")
str += "QCA_NO_TESTS = 1\n";