45 lines
1,010 B
Text
45 lines
1,010 B
Text
|
|
/*
|
||
|
|
-----BEGIN QCMOD-----
|
||
|
|
name: the XScreenSaver extension
|
||
|
|
-----END QCMOD-----
|
||
|
|
*/
|
||
|
|
|
||
|
|
//----------------------------------------------------------------------------
|
||
|
|
// qc_xss
|
||
|
|
//----------------------------------------------------------------------------
|
||
|
|
class qc_xss : public ConfObj
|
||
|
|
{
|
||
|
|
public:
|
||
|
|
qc_xss(Conf *c) : ConfObj(c) {}
|
||
|
|
|
||
|
|
QString name() const { return "the XScreenSaver extension"; }
|
||
|
|
QString shortname() const { return "xss"; }
|
||
|
|
|
||
|
|
bool exec()
|
||
|
|
{
|
||
|
|
QString str =
|
||
|
|
"#include<X11/Xlib.h>\n"
|
||
|
|
"#include<X11/Xutil.h>\n"
|
||
|
|
"#include<X11/extensions/scrnsaver.h>\n"
|
||
|
|
"\n"
|
||
|
|
"int main()\n"
|
||
|
|
"{\n"
|
||
|
|
" XScreenSaverQueryExtension(NULL, NULL, NULL);\n"
|
||
|
|
" return 0;\n"
|
||
|
|
"}\n";
|
||
|
|
QString proextra = "CONFIG += x11\n";
|
||
|
|
|
||
|
|
if (!conf->doCompileAndLink(str, QStringList(), "-lXss", proextra, NULL)) {
|
||
|
|
if (!conf->doCompileAndLink(str, QStringList(), QString(), proextra, NULL)) {
|
||
|
|
return false;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
else {
|
||
|
|
conf->addLib("-lXss");
|
||
|
|
}
|
||
|
|
|
||
|
|
conf->addDefine("HAVE_XSS");
|
||
|
|
return true;
|
||
|
|
}
|
||
|
|
};
|