initial commit
This commit is contained in:
commit
9d20827c46
2469 changed files with 470994 additions and 0 deletions
64
qcm/aspell.qcm
Normal file
64
qcm/aspell.qcm
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: ASPELL
|
||||
arg: with-aspell-inc=[path],Path to Aspell include files
|
||||
arg: with-aspell-lib=[path],Path to Aspell library files
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// qc_spell
|
||||
//----------------------------------------------------------------------------
|
||||
class qc_aspell : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_aspell(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "Aspell support"; }
|
||||
QString shortname() const { return "aspell"; }
|
||||
bool exec()
|
||||
{
|
||||
QString s;
|
||||
|
||||
s = conf->getenv("QC_WITH_ASPELL_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkHeader(s, "aspell.h")) {
|
||||
conf->debug("Aspell includes not found!");
|
||||
return false;
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
}
|
||||
else {
|
||||
QStringList sl;
|
||||
sl += "/usr/include";
|
||||
sl += "/usr/local/include";
|
||||
sl += "/sw/include";
|
||||
if(!conf->findHeader("aspell.h", sl, &s)) {
|
||||
conf->debug("Aspell includes not found!");
|
||||
return false;
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
}
|
||||
|
||||
s = conf->getenv("QC_WITH_ASPELL_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkLibrary(s, "aspell")) {
|
||||
conf->debug("Aspell libraries not found!");
|
||||
return false;
|
||||
}
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
else {
|
||||
if(!conf->findLibrary("aspell", &s)) {
|
||||
conf->debug("Aspell libraries not found!");
|
||||
return false;
|
||||
}
|
||||
if (!s.isEmpty())
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
|
||||
// conf->addLib("-laspell");
|
||||
// conf->addDefine("HAVE_ASPELL");
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
29
qcm/bundled-qca.qcm
Normal file
29
qcm/bundled-qca.qcm
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: Use bundled QCA
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// qc_bundled_qca
|
||||
//----------------------------------------------------------------------------
|
||||
class qc_bundled_qca : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_bundled_qca(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "bundled QCA 2.0"; }
|
||||
QString shortname() const { return "bundled_qca"; }
|
||||
|
||||
bool exec()
|
||||
{
|
||||
// FIXME: Check QCA version number
|
||||
if (QFile::exists("third-party/qca/qca")) {
|
||||
conf->addExtra("CONFIG += qca-static");
|
||||
conf->addDefine("QCA_NO_PLUGINS");
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
};
|
||||
117
qcm/certstore.qcm
Normal file
117
qcm/certstore.qcm
Normal file
|
|
@ -0,0 +1,117 @@
|
|||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: certstore
|
||||
section: project
|
||||
arg: certstore-path=[path],Path to the SSL/X509 Certificate store file (bundled QCA only)
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
|
||||
class qc_certstore : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_certstore(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "certstore"; }
|
||||
QString shortname() const { return "certstore"; }
|
||||
|
||||
QString checkString() const {
|
||||
if (!QFile::exists("third-party/qca/qca") || !conf->getenv("QC_DISABLE_bundled_qca").isEmpty())
|
||||
return "";
|
||||
else
|
||||
return ConfObj::checkString();
|
||||
}
|
||||
|
||||
bool exec()
|
||||
{
|
||||
if (!QFile::exists("third-party/qca/qca") || !conf->getenv("QC_DISABLE_bundled_qca").isEmpty() || !QFile::exists("third-party/qca/qca-ossl")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bundled = false;
|
||||
|
||||
#if defined(Q_OS_WIN) || defined(Q_OS_MAC)
|
||||
// use built-in
|
||||
return true;
|
||||
#else
|
||||
QStringList pathsToTry;
|
||||
|
||||
path = conf->getenv("QC_CERTSTORE_PATH");
|
||||
if(!path.isEmpty())
|
||||
{
|
||||
if(QFile::exists(path))
|
||||
{
|
||||
QString certPathString =
|
||||
"QCA_SYSTEMSTORE_PATH=\\\\\\\\\\\\\"" + path + "\\\\\\\\\\\\\"";
|
||||
conf->addDefine(certPathString);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// This is from Debian
|
||||
pathsToTry.append( QString("/etc/ssl/certs/ca-certificates.crt") );
|
||||
|
||||
// Fedora Core 2 uses these
|
||||
pathsToTry.append( QString("/usr/share/ssl/cert.pem") );
|
||||
pathsToTry.append( QString("/usr/share/ssl/certs/ca-bundle.crt") );
|
||||
|
||||
// Fedora Core 5 changes to this
|
||||
pathsToTry.append( QString("/etc/pki/tls/cert.pem") );
|
||||
|
||||
for(int n = 0; n < pathsToTry.count(); ++n)
|
||||
{
|
||||
if(QFile::exists(pathsToTry[n]))
|
||||
{
|
||||
path = pathsToTry[n];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// fall back to bundled
|
||||
if(path.isEmpty())
|
||||
{
|
||||
// --prefix=$pwd ?
|
||||
if(QFile::exists(conf->getenv("PREFIX") + "/certs/rootcerts.pem"))
|
||||
path = "$$PREFIX/certs/rootcerts.pem";
|
||||
else
|
||||
path = "$$DATADIR/yachat/certs/rootcerts.pem";
|
||||
|
||||
QString extra =
|
||||
"qcasharedfiles.path = $$DATADIR/yachat\n"
|
||||
"qcasharedfiles.files = third-party/qca/qca/certs\n"
|
||||
"INSTALLS += qcasharedfiles\n";
|
||||
conf->addExtra(extra);
|
||||
bundled = true;
|
||||
}
|
||||
|
||||
// Qt<4.2 workaround
|
||||
QString certPathString =
|
||||
"QCA_SYSTEMSTORE_PATH=\\\\\\\\\\\\\"" + path + "\\\\\\\\\\\\\"";
|
||||
conf->addDefine(certPathString);
|
||||
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
||||
QString resultString() const
|
||||
{
|
||||
#if defined(Q_OS_WIN)
|
||||
return "using Windows built-in";
|
||||
#elif defined(Q_OS_MAC)
|
||||
return "using Mac built-in";
|
||||
#else
|
||||
if(success)
|
||||
{
|
||||
if(bundled)
|
||||
return "using bundled";
|
||||
else
|
||||
return path;
|
||||
}
|
||||
else
|
||||
return ConfObj::resultString();
|
||||
#endif
|
||||
}
|
||||
|
||||
private:
|
||||
QString path;
|
||||
bool bundled;
|
||||
};
|
||||
31
qcm/conf.qcm
Normal file
31
qcm/conf.qcm
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: Psi Configuration
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// qc_conf
|
||||
//----------------------------------------------------------------------------
|
||||
class qc_conf : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_conf(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "Psi Configuration"; }
|
||||
QString shortname() const { return "conf"; }
|
||||
QString checkString() const { return QString(); }
|
||||
bool exec()
|
||||
{
|
||||
conf->addExtra(QString("PSI_DATADIR=%1/yachat").arg(conf->getenv("DATADIR")));
|
||||
|
||||
QFile file("src/config.h");
|
||||
if ( file.open(QIODevice::WriteOnly | QIODevice::Text) ) {
|
||||
QTextStream stream( &file );
|
||||
stream << "#define PSI_DATADIR \"" << conf->getenv("DATADIR") << "/yachat\"" << endl;
|
||||
}
|
||||
|
||||
conf->addDefine("HAVE_CONFIG");
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
62
qcm/cyrussasl.qcm
Normal file
62
qcm/cyrussasl.qcm
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: Cyrus SASL2 (bundled QCA only)
|
||||
arg: with-sasl-inc=[path],Path to Cyrus SASL2 include files (bundled QCA only)
|
||||
arg: with-sasl-lib=[path],Path to Cyrus SASL2 library files (bundled QCA only)
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
class qc_cyrussasl : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_cyrussasl(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "Cyrus SASL2"; }
|
||||
QString shortname() const { return "cyrussasl"; }
|
||||
|
||||
QString checkString() const {
|
||||
if (!QFile::exists("third-party/qca/qca") || !conf->getenv("QC_DISABLE_bundled_qca").isEmpty())
|
||||
return "";
|
||||
else
|
||||
return ConfObj::checkString();
|
||||
}
|
||||
|
||||
bool exec()
|
||||
{
|
||||
if (!QFile::exists("third-party/qca/qca") || !conf->getenv("QC_DISABLE_bundled_qca").isEmpty() || !QFile::exists("third-party/qca/qca-sasl"))
|
||||
return false;
|
||||
|
||||
QString inc, lib;
|
||||
QString s;
|
||||
|
||||
s = conf->getenv("QC_WITH_SASL_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkHeader(s, "sasl/sasl.h"))
|
||||
return false;
|
||||
inc = s;
|
||||
}
|
||||
else {
|
||||
if(!conf->findHeader("sasl/sasl.h", QStringList(), &s))
|
||||
return false;
|
||||
inc = s;
|
||||
}
|
||||
|
||||
s = conf->getenv("QC_WITH_SASL_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkLibrary(s, "sasl2"))
|
||||
return false;
|
||||
lib = s;
|
||||
}
|
||||
else {
|
||||
if(!conf->findLibrary("sasl2", &s))
|
||||
return false;
|
||||
lib = s;
|
||||
}
|
||||
|
||||
if(!inc.isEmpty())
|
||||
conf->addIncludePath(inc);
|
||||
if(!lib.isEmpty())
|
||||
conf->addLib(QString("-L") + s);
|
||||
conf->addLib("-lsasl2");
|
||||
conf->addDefine("HAVE_CYRUSSASL");
|
||||
return true;
|
||||
}
|
||||
};
|
||||
27
qcm/debug.qcm
Normal file
27
qcm/debug.qcm
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: Debugging support
|
||||
arg: enable-debug,Enable debugging support
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// qc_debug
|
||||
//----------------------------------------------------------------------------
|
||||
class qc_debug : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_debug(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "debugging support"; }
|
||||
QString shortname() const { return "debug"; }
|
||||
QString checkString() const { return QString(); }
|
||||
|
||||
bool exec()
|
||||
{
|
||||
if (conf->getenv("QC_ENABLE_DEBUG").isEmpty())
|
||||
conf->addExtra("CONFIG += release");
|
||||
else
|
||||
conf->addExtra("CONFIG += debug");
|
||||
return true;
|
||||
}
|
||||
};
|
||||
44
qcm/dnotify.qcm
Normal file
44
qcm/dnotify.qcm
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: Linux Directory Notification
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
|
||||
#include<unistd.h>
|
||||
#include<fcntl.h>
|
||||
#include<signal.h>
|
||||
#include<sys/utsname.h>
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// qc_dnotify
|
||||
//----------------------------------------------------------------------------
|
||||
class qc_dnotify : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_dnotify(Conf *c) : ConfObj(c) { }
|
||||
|
||||
QString name() const { return "Linux Directory Notification"; }
|
||||
QString shortname() const { return "dnotify"; }
|
||||
|
||||
bool exec()
|
||||
{
|
||||
QString str =
|
||||
"#define _GNU_SOURCE\n"
|
||||
"#include<unistd.h>\n"
|
||||
"#include<fcntl.h>\n"
|
||||
"#include<signal.h>\n"
|
||||
"#include<sys/utsname.h>\n"
|
||||
"\n"
|
||||
"int main()\n"
|
||||
"{\n"
|
||||
" DN_DELETE|DN_CREATE|DN_RENAME|DN_MULTISHOT|DN_MODIFY|DN_ATTRIB;\n"
|
||||
" return 0;\n"
|
||||
"}\n";
|
||||
int ret;
|
||||
if (!conf->doCompileAndLink(str, QStringList(), QString(), QString(), &ret) || ret != 0)
|
||||
return false;
|
||||
|
||||
conf->addDefine("HAVE_DNOTIFY");
|
||||
return true;
|
||||
}
|
||||
};
|
||||
30
qcm/ghbnr.qcm
Normal file
30
qcm/ghbnr.qcm
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: gethostbyname_r()
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
class qc_ghbnr : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_ghbnr(Conf *c) : ConfObj(c) { }
|
||||
|
||||
QString name() const { return "gethostbyname_r()"; }
|
||||
QString shortname() const { return "ghbnr"; }
|
||||
|
||||
bool exec()
|
||||
{
|
||||
QString str =
|
||||
"#include<netdb.h>\n"
|
||||
"\n"
|
||||
"int main()\n"
|
||||
"{\n"
|
||||
" gethostbyname_r(\"\", 0, 0, 0, 0, 0);\n"
|
||||
" return 0;\n"
|
||||
"}\n";
|
||||
if (!conf->doCompileAndLink(str, QStringList(), QString(), QString(), NULL))
|
||||
return false;
|
||||
|
||||
conf->addDefine("HAVE_GETHOSTBYNAME_R");
|
||||
return true;
|
||||
}
|
||||
};
|
||||
66
qcm/google_ft.qcm
Normal file
66
qcm/google_ft.qcm
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: Google File Transfer
|
||||
arg: enable-google-ft,Enable Google File Transfer support
|
||||
arg: with-expat-inc=[path],Path to Expat include files (for Google)
|
||||
arg: with-expat-lib=[path],Path to Expat library files (for Google)
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// qc_google_ft
|
||||
//----------------------------------------------------------------------------
|
||||
class qc_google_ft : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_google_ft(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "Google File Transfer"; }
|
||||
QString shortname() const { return "GoogleFT"; }
|
||||
bool exec()
|
||||
{
|
||||
QString s = conf->getenv("QC_ENABLE_GOOGLE_FT");
|
||||
if(s.isEmpty())
|
||||
return false;
|
||||
|
||||
// Expat
|
||||
s = conf->getenv("QC_WITH_EXPAT_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkHeader(s, "expat.h")) {
|
||||
qWarning("Expat includes not found!");
|
||||
return false;
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
}
|
||||
else {
|
||||
if(!conf->findHeader("expat.h", QStringList(), &s)) {
|
||||
qWarning("Expat includes not found!");
|
||||
return false;
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
}
|
||||
|
||||
s = conf->getenv("QC_WITH_EXPAT_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkLibrary(s, "expat")) {
|
||||
qWarning("Expat library not found!");
|
||||
return false;
|
||||
}
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
else {
|
||||
if(!conf->findLibrary("expat", &s)) {
|
||||
qWarning("Expat library not found!");
|
||||
return false;
|
||||
}
|
||||
if (!s.isEmpty())
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
|
||||
conf->addLib("-lexpat");
|
||||
|
||||
// Finish
|
||||
conf->addExtra("CONFIG += google_ft");
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
63
qcm/growl.qcm
Normal file
63
qcm/growl.qcm
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: Growl
|
||||
arg: with-growl=[path],Path to the Growl framework
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// qc_growl
|
||||
//----------------------------------------------------------------------------
|
||||
class qc_growl : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_growl(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "Growl"; }
|
||||
QString shortname() const { return "growl"; }
|
||||
#ifndef Q_WS_MAC
|
||||
QString checkString() const { return QString(); }
|
||||
#endif
|
||||
|
||||
// TODO: This should go into ConfObj
|
||||
bool checkFramework(const QString &path, const QString &name)
|
||||
{
|
||||
QString str =
|
||||
"int main()\n"
|
||||
"{\n"
|
||||
" return 0;\n"
|
||||
"}\n";
|
||||
|
||||
QString extra;
|
||||
if(!path.isEmpty())
|
||||
extra += QString("-F") + path + ' ';
|
||||
extra += QString("-framework ") + name;
|
||||
if(!conf->doCompileAndLink(str, QStringList(), extra, "", NULL))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
// TODO: This should go into ConfObj
|
||||
void addFrameworkPath(const QString& str)
|
||||
{
|
||||
conf->addExtra("QMAKE_CXXFLAGS += -F" + str);
|
||||
conf->addLib("-F" + str);
|
||||
}
|
||||
|
||||
bool exec()
|
||||
{
|
||||
#ifdef Q_WS_MAC
|
||||
QString growl_path = conf->getenv("QC_WITH_GROWL");
|
||||
if(!checkFramework(growl_path, "Growl"))
|
||||
return false;
|
||||
|
||||
if(!growl_path.isEmpty())
|
||||
addFrameworkPath(growl_path);
|
||||
conf->addLib("-framework Growl");
|
||||
conf->addDefine("HAVE_GROWL");
|
||||
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
};
|
||||
376
qcm/jingle.qcm
Normal file
376
qcm/jingle.qcm
Normal file
|
|
@ -0,0 +1,376 @@
|
|||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: Jingle
|
||||
arg: enable-jingle,Enable Jingle support
|
||||
arg: with-expat-inc=[path],Path to Expat include files (for Jingle)
|
||||
arg: with-expat-lib=[path],Path to Expat library files (for Jingle)
|
||||
arg: with-speex-inc=[path],Path to Speex include files (for Jingle)
|
||||
arg: with-speex-lib=[path],Path to Speex library files (for Jingle)
|
||||
arg: with-ilbc-inc=[path],Path to iLBC include files (for Jingle)
|
||||
arg: with-ilbc-lib=[path],Path to iLBC library files (for Jingle)
|
||||
arg: with-ortp-inc=[path],Path to ORTP include files (for Jingle)
|
||||
arg: with-ortp-lib=[path],Path to ORTP library files (for Jingle)
|
||||
arg: with-alsa-inc=[path],Path to Alsa include files (for Jingle)
|
||||
arg: with-alsa-lib=[path],Path to Alsa library files (for Jingle)
|
||||
arg: with-portaudio-inc=[path],Path to PortAudio include files (for Jingle)
|
||||
arg: with-portaudio-lib=[path],Path to PortAudio library files (for Jingle)
|
||||
arg: with-glib-inc=[path],Path to GLib include files (for Jingle)
|
||||
arg: with-glib-lib=[path],Path to GLib library files (for Jingle)
|
||||
arg: with-glibconfig-inc=[path],Path to glibconfig include file (for Jingle)
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// qc_jingle
|
||||
//----------------------------------------------------------------------------
|
||||
class qc_jingle : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_jingle(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "Jingle"; }
|
||||
QString shortname() const { return "Jingle"; }
|
||||
bool exec()
|
||||
{
|
||||
QString s;
|
||||
|
||||
// Check if Jingle was enabled explicitly
|
||||
s = conf->getenv("QC_ENABLE_JINGLE");
|
||||
if(s.isEmpty())
|
||||
return false;
|
||||
|
||||
// Expat
|
||||
s = conf->getenv("QC_WITH_EXPAT_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkHeader(s, "expat.h")) {
|
||||
qWarning("Expat includes not found!");
|
||||
return false;
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
}
|
||||
else {
|
||||
if(!conf->findHeader("expat.h", QStringList(), &s)) {
|
||||
qWarning("Expat includes not found!");
|
||||
return false;
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
}
|
||||
|
||||
s = conf->getenv("QC_WITH_EXPAT_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkLibrary(s, "expat")) {
|
||||
qWarning("Expat library not found!");
|
||||
return false;
|
||||
}
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
else {
|
||||
if(!conf->findLibrary("expat", &s)) {
|
||||
qWarning("Expat library not found!");
|
||||
return false;
|
||||
}
|
||||
if (!s.isEmpty())
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
|
||||
conf->addLib("-lexpat");
|
||||
|
||||
|
||||
// Speex
|
||||
s = conf->getenv("QC_WITH_SPEEX_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkHeader(s, "speex.h")) {
|
||||
qWarning("Speex includes not found!");
|
||||
return false;
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
}
|
||||
else {
|
||||
QStringList sl;
|
||||
sl += "/usr/include/speex";
|
||||
sl += "/usr/local/include/speex";
|
||||
if(!conf->findHeader("speex.h", sl, &s)) {
|
||||
qWarning("Speex includes not found!");
|
||||
return false;
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
}
|
||||
|
||||
s = conf->getenv("QC_WITH_SPEEX_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkLibrary(s, "speex")) {
|
||||
qWarning("Speex libraries not found!");
|
||||
return false;
|
||||
}
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
else {
|
||||
if(!conf->findLibrary("speex", &s)) {
|
||||
qWarning("Speex libraries not found!");
|
||||
return false;
|
||||
}
|
||||
if (!s.isEmpty())
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
|
||||
conf->addDefine("HAVE_SPEEX");
|
||||
conf->addLib("-lspeex");
|
||||
|
||||
|
||||
// ILBC (optional)
|
||||
QString ilbc_include, ilbc_lib;
|
||||
s = conf->getenv("QC_WITH_ILBC_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(conf->checkHeader(s, "iLBC_encode.h")) {
|
||||
ilbc_include = s;
|
||||
}
|
||||
}
|
||||
else {
|
||||
QStringList sl;
|
||||
sl += "/usr/include/ilbc";
|
||||
sl += "/usr/local/include/ilbc";
|
||||
if(conf->findHeader("iLBC_encode.h", sl, &s)) {
|
||||
ilbc_include = s;
|
||||
}
|
||||
}
|
||||
|
||||
s = conf->getenv("QC_WITH_ILBC_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(conf->checkLibrary(s, "ilbc")) {
|
||||
ilbc_lib = s;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(conf->findLibrary("ilbc", &s)) {
|
||||
ilbc_lib = s;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ilbc_include.isEmpty() && !ilbc_lib.isEmpty()) {
|
||||
conf->addIncludePath(ilbc_include);
|
||||
conf->addLib(QString("-L") + ilbc_lib);
|
||||
conf->addLib("-lilbc");
|
||||
conf->addDefine("HAVE_ILBC");
|
||||
}
|
||||
|
||||
|
||||
// ORTP
|
||||
s = conf->getenv("QC_WITH_ORTP_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(conf->checkHeader(s, "ortp/ortp.h")) {
|
||||
conf->addIncludePath(s);
|
||||
}
|
||||
else {
|
||||
qWarning("ORTP includes not found!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
QStringList sl;
|
||||
sl += "/usr/include";
|
||||
sl += "/usr/local/include";
|
||||
if(conf->findHeader("ortp/ortp.h", sl, &s)) {
|
||||
conf->addIncludePath(s);
|
||||
}
|
||||
else {
|
||||
qWarning("ORTP includes not found!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
s = conf->getenv("QC_WITH_ORTP_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(conf->checkLibrary(s, "ortp")) {
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
else {
|
||||
qWarning("ORTP libraries not found!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(conf->findLibrary("ortp", &s)) {
|
||||
if (!s.isEmpty())
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
else {
|
||||
qWarning("ORTP libraries not found!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
conf->addLib("-lortp");
|
||||
conf->addDefine("HAVE_ORTP");
|
||||
|
||||
|
||||
#if defined(Q_WS_X11)
|
||||
s = conf->getenv("QC_WITH_ALSA_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(conf->checkHeader(s, "alsa/asoundlib.h")) {
|
||||
conf->addIncludePath(s);
|
||||
}
|
||||
else {
|
||||
qWarning("Alsa includes not found!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
QStringList sl;
|
||||
sl += "/usr/include";
|
||||
sl += "/usr/local/include";
|
||||
if(conf->findHeader("alsa/asoundlib.h", sl, &s)) {
|
||||
conf->addIncludePath(s);
|
||||
}
|
||||
else {
|
||||
qWarning("Alsa includes not found!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
s = conf->getenv("QC_WITH_ALSA_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(conf->checkLibrary(s, "asound")) {
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
else {
|
||||
qWarning("Alsa libraries not found!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(conf->findLibrary("asound", &s)) {
|
||||
if (!s.isEmpty())
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
else {
|
||||
qWarning("Alsa libraries not found!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
conf->addLib("-lasound");
|
||||
conf->addDefine("HAVE_ALSA_ASOUNDLIB_H");
|
||||
conf->addDefine("__ALSA_ENABLED__");
|
||||
#elif defined(Q_WS_MAC)
|
||||
// Check for PortAudio
|
||||
s = conf->getenv("QC_WITH_PORTAUDIO_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkHeader(s, "portaudio.h")) {
|
||||
qWarning("Portaudio includes not found!");
|
||||
return false;
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
}
|
||||
else {
|
||||
if(!conf->findHeader("portaudio.h", QStringList(), &s)) {
|
||||
qWarning("Portaudio includes not found!");
|
||||
return false;
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
}
|
||||
|
||||
s = conf->getenv("QC_WITH_PORTAUDIO_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkLibrary(s, "portaudio")) {
|
||||
qWarning("PortAudio library not found!");
|
||||
return false;
|
||||
}
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
else {
|
||||
if(!conf->findLibrary("portaudio", &s)) {
|
||||
qWarning("PortAudio library not found!");
|
||||
return false;
|
||||
}
|
||||
if (!s.isEmpty())
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
|
||||
conf->addLib("-lportaudio");
|
||||
conf->addDefine("HAVE_PORTAUDIO");
|
||||
#endif
|
||||
QFile file("third-party/libjingle/config.h");
|
||||
if (file.open(QIODevice::WriteOnly))
|
||||
file.close();
|
||||
|
||||
// GLib
|
||||
s = conf->getenv("QC_WITH_GLIB_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(conf->checkHeader(s, "glib.h")) {
|
||||
conf->addIncludePath(s);
|
||||
}
|
||||
else {
|
||||
qWarning("GLib includes not found!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
QStringList sl;
|
||||
sl += "/usr/include/glib";
|
||||
sl += "/usr/local/include/glib";
|
||||
sl += "/usr/include/glib-2.0";
|
||||
if(conf->findHeader("glib.h", sl, &s)) {
|
||||
conf->addIncludePath(s);
|
||||
}
|
||||
else {
|
||||
qWarning("GLib includes not found!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
s = conf->getenv("QC_WITH_GLIB_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(conf->checkLibrary(s, "glib-2.0")) {
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
else {
|
||||
qWarning("GLib 2.0 libraries not found!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(conf->findLibrary("glib-2.0", &s)) {
|
||||
if (!s.isEmpty())
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
else {
|
||||
qWarning("GLib 2.0 libraries not found!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
conf->addLib("-lglib-2.0 -lgmodule-2.0 -lgthread-2.0");
|
||||
conf->addDefine("HAVE_GLIB");
|
||||
|
||||
// Glibconfig
|
||||
s = conf->getenv("QC_WITH_GLIBCONFIG_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(conf->checkHeader(s, "glibconfig.h")) {
|
||||
conf->addIncludePath(s);
|
||||
}
|
||||
else {
|
||||
qWarning("glibconfig.h includes not found!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(conf->findHeader("glibconfig.h", QStringList("/usr/lib/glib-2.0/include"), &s)) {
|
||||
conf->addIncludePath(s);
|
||||
}
|
||||
else {
|
||||
qWarning("glibconfig.h not found!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Finish
|
||||
conf->addExtra("CONFIG += jingle");
|
||||
|
||||
qWarning("");
|
||||
qWarning("");
|
||||
qWarning(" !!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!");
|
||||
qWarning(" LIBJINGLE SUPPORT IS STILL EXPERIMENTAL !!!");
|
||||
qWarning(" USE AT YOUR OWN RISK !!!");
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
25
qcm/kde.qcm
Normal file
25
qcm/kde.qcm
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: KDE
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// qc_kde
|
||||
//----------------------------------------------------------------------------
|
||||
class qc_kde : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_kde(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "KDE"; }
|
||||
QString shortname() const { return "kde"; }
|
||||
bool exec()
|
||||
{
|
||||
char *p = getenv("KDEDIR");
|
||||
if(!p)
|
||||
return false;
|
||||
|
||||
conf->addExtra(QString("KDE = %1").arg(p));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
94
qcm/openssl.qcm
Normal file
94
qcm/openssl.qcm
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: OpenSSL (bundled QCA only)
|
||||
arg: with-openssl-inc=[path],Path to OpenSSL include files (bundled QCA only)
|
||||
arg: with-openssl-lib=[path],Path to OpenSSL library files (bundled QCA only)
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
class qc_openssl : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_openssl(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "OpenSSL"; }
|
||||
QString shortname() const { return "openssl"; }
|
||||
|
||||
QString checkString() const {
|
||||
if (!QFile::exists("third-party/qca/qca") || !conf->getenv("QC_DISABLE_bundled_qca").isEmpty())
|
||||
return "";
|
||||
else
|
||||
return ConfObj::checkString();
|
||||
}
|
||||
|
||||
bool exec()
|
||||
{
|
||||
if (!QFile::exists("third-party/qca/qca") || !conf->getenv("QC_DISABLE_bundled_qca").isEmpty() || !QFile::exists("third-party/qca/qca-ossl"))
|
||||
return false;
|
||||
|
||||
QString inc, lib;
|
||||
QString s;
|
||||
bool kb = false;
|
||||
QString kbdir = "/usr/kerberos/include";
|
||||
|
||||
// Redhat 9?
|
||||
if(QFileInfo(kbdir).exists())
|
||||
kb = true;
|
||||
|
||||
s = conf->getenv("QC_WITH_OPENSSL_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkHeader(s, "openssl/ssl.h"))
|
||||
return false;
|
||||
inc = s;
|
||||
}
|
||||
else {
|
||||
if(!conf->findHeader("openssl/ssl.h", QStringList(), &s))
|
||||
return false;
|
||||
inc = s;
|
||||
}
|
||||
|
||||
s = conf->getenv("QC_WITH_OPENSSL_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkLibrary(s, "ssl"))
|
||||
return false;
|
||||
lib = s;
|
||||
}
|
||||
else {
|
||||
if(!conf->findLibrary("ssl", &s))
|
||||
return false;
|
||||
lib = s;
|
||||
}
|
||||
|
||||
// is it at least openssl 0.9.7?
|
||||
QString str =
|
||||
"#include<openssl/opensslv.h>\n"
|
||||
"int main()\n"
|
||||
"{\n"
|
||||
" unsigned long x = OPENSSL_VERSION_NUMBER;\n"
|
||||
" if(x >= 0x00907000) return 0; else return 1;\n"
|
||||
"}\n";
|
||||
QString ext;
|
||||
QStringList incs;
|
||||
if(!inc.isEmpty())
|
||||
incs += inc;
|
||||
if(kb)
|
||||
incs += kbdir;
|
||||
if(!lib.isEmpty())
|
||||
ext += QString("-L") + lib + " -lssl -lcrypto ";
|
||||
int ret;
|
||||
if(!conf->doCompileAndLink(str, incs, ext, QString(), &ret))
|
||||
return false;
|
||||
if(ret == 0)
|
||||
conf->addDefine("OSSL_097");
|
||||
|
||||
if(!inc.isEmpty())
|
||||
conf->addIncludePath(inc);
|
||||
if(kb)
|
||||
conf->addIncludePath(kbdir);
|
||||
if(!lib.isEmpty())
|
||||
conf->addLib(QString("-L") + s);
|
||||
conf->addLib("-lssl -lcrypto");
|
||||
|
||||
conf->addDefine("HAVE_OPENSSL");
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
41
qcm/plugins.qcm
Normal file
41
qcm/plugins.qcm
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: Plugins
|
||||
arg: enable-plugins,Enable Psi Plugin support
|
||||
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// qc_plugins
|
||||
//----------------------------------------------------------------------------
|
||||
class qc_plugins : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_plugins(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "Plugins"; }
|
||||
QString shortname() const { return "Plugins"; }
|
||||
bool exec()
|
||||
{
|
||||
QString s;
|
||||
|
||||
// Check if Jingle was enabled explicitly
|
||||
s = conf->getenv("QC_ENABLE_PLUGINS");
|
||||
if(s.isEmpty())
|
||||
return false;
|
||||
|
||||
conf->addDefine("PSI_PLUGINS");
|
||||
|
||||
// Finish
|
||||
conf->addExtra("CONFIG += psi_plugins");
|
||||
|
||||
qWarning("");
|
||||
qWarning("");
|
||||
qWarning(" !!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!!");
|
||||
qWarning(" PLUGIN SUPPORT IS STILL UNFINISHED !!!");
|
||||
qWarning(" THE PLUGIN INTERFACE /WILL/ CHANGE !!!");
|
||||
qWarning(" USE AT YOUR OWN RISK !!!");
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
53
qcm/qca.qcm
Normal file
53
qcm/qca.qcm
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: external QCA 2.0
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// qc_qca
|
||||
//----------------------------------------------------------------------------
|
||||
class qc_qca : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_qca(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "QCA 2.0"; }
|
||||
QString shortname() const { return "qca"; }
|
||||
|
||||
QString checkString() const {
|
||||
if (QFile::exists("third-party/qca/qca") && conf->getenv("QC_DISABLE_bundled_qca").isEmpty())
|
||||
return "";
|
||||
else
|
||||
return ConfObj::checkString();
|
||||
}
|
||||
|
||||
bool exec()
|
||||
{
|
||||
// Check if we have a bundnled version
|
||||
if (QFile::exists("third-party/qca/qca") && conf->getenv("QC_DISABLE_bundled_qca").isEmpty())
|
||||
return true;
|
||||
|
||||
// test for "crypto" feature and check qca version number
|
||||
|
||||
QString proextra =
|
||||
"CONFIG += qt crypto\n"
|
||||
"QT -= gui\n";
|
||||
|
||||
QString str =
|
||||
"#include <QtCrypto>\n"
|
||||
"\n"
|
||||
"int main()\n"
|
||||
"{\n"
|
||||
" unsigned long x = QCA_VERSION;\n"
|
||||
" if(x >= 0x016363) return 0; else return 1;\n"
|
||||
"}\n";
|
||||
|
||||
int ret;
|
||||
if(!conf->doCompileAndLink(str, QStringList(), QString(), proextra, &ret))
|
||||
return false;
|
||||
if(ret != 0)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
43
qcm/qdbus.qcm
Normal file
43
qcm/qdbus.qcm
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: QDBUS
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// qc_qdbus
|
||||
//----------------------------------------------------------------------------
|
||||
class qc_qdbus : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_qdbus(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "QDBUS"; }
|
||||
QString shortname() const { return "qdbus"; }
|
||||
bool exec()
|
||||
{
|
||||
if (!conf->getenv("QC_DISABLE_qdbus").isEmpty())
|
||||
return false;
|
||||
|
||||
// test for "qdbus" feature
|
||||
|
||||
QString proextra =
|
||||
"CONFIG += qt qdbus\n"
|
||||
"QT -= gui\n";
|
||||
|
||||
QString str =
|
||||
"\n"
|
||||
"int main()\n"
|
||||
"{\n"
|
||||
" return 0;\n"
|
||||
"}\n";
|
||||
|
||||
int ret;
|
||||
if(!conf->doCompileAndLink(str, QStringList(), QString(), proextra, &ret))
|
||||
return false;
|
||||
if(ret != 0)
|
||||
return false;
|
||||
|
||||
conf->addExtra("CONFIG += dbus");
|
||||
return true;
|
||||
}
|
||||
};
|
||||
16
qcm/qt4.qcm
Normal file
16
qcm/qt4.qcm
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: Qt >= 4.1
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
class qc_qt4 : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_qt4(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "Qt >= 4.2.3"; }
|
||||
QString shortname() const { return "qt4"; }
|
||||
bool exec()
|
||||
{
|
||||
return(QT_VERSION >= 0x040203);
|
||||
}
|
||||
};
|
||||
63
qcm/tests.qcm
Normal file
63
qcm/tests.qcm
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: Tests
|
||||
arg: with-cppunit-inc=[path],Path to CppUnit include files
|
||||
arg: with-cppunit-lib=[path],Path to CppUnit library files
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// qc_tests
|
||||
//----------------------------------------------------------------------------
|
||||
class qc_tests : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_tests(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "tests"; }
|
||||
QString shortname() const { return "tests"; }
|
||||
bool exec()
|
||||
{
|
||||
QString s = conf->getenv("QC_WITH_CPPUNIT_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkHeader(s, "cppunit/Test.h")) {
|
||||
conf->debug("CppUnit includes not found!");
|
||||
return false;
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
}
|
||||
else {
|
||||
QStringList sl;
|
||||
sl += "/usr/include";
|
||||
sl += "/usr/local/include";
|
||||
sl += "/sw/include";
|
||||
sl += "/opt/local/include";
|
||||
if(!conf->findHeader("cppunit/Test.h", sl, &s)) {
|
||||
conf->debug("CppUnit includes not found!");
|
||||
return false;
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
}
|
||||
|
||||
s = conf->getenv("QC_WITH_CPPUNIT_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkLibrary(s, "cppunit")) {
|
||||
conf->debug("CppUnit libraries not found!");
|
||||
return false;
|
||||
}
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
else {
|
||||
if(!conf->findLibrary("cppunit", &s)) {
|
||||
conf->debug("CppUnit libraries not found!");
|
||||
return false;
|
||||
}
|
||||
if (!s.isEmpty())
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
|
||||
conf->addLib("-lcppunit");
|
||||
conf->addExtra("CONFIG += tests");
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
25
qcm/universal.qcm
Normal file
25
qcm/universal.qcm
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: Mac OS X universal binary support
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// qc_universal
|
||||
//----------------------------------------------------------------------------
|
||||
class qc_universal : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_universal(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "universal binary support"; }
|
||||
QString shortname() const { return "universal"; }
|
||||
QString checkString() const { return QString(); }
|
||||
|
||||
bool exec()
|
||||
{
|
||||
#ifdef Q_WS_MAC
|
||||
conf->addExtra("CONFIG += qc_universal");
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
};
|
||||
154
qcm/xmms.qcm
Normal file
154
qcm/xmms.qcm
Normal file
|
|
@ -0,0 +1,154 @@
|
|||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: XMMS
|
||||
arg: with-xmms-inc=[path],Path to XMMS include files (for XMMS)
|
||||
arg: with-xmms-lib=[path],Path to XMMS library files (for XMMS)
|
||||
arg: with-glib-inc=[path],Path to GLib include files (for XMMS)
|
||||
arg: with-glib-lib=[path],Path to GLib library files (for XMMS)
|
||||
arg: with-glibconfig-inc=[path],Path to glibconfig include file (for XMMS)
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// qc_xmms
|
||||
//----------------------------------------------------------------------------
|
||||
class qc_xmms : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_xmms(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "XMMS"; }
|
||||
QString shortname() const { return "xmms"; }
|
||||
bool exec()
|
||||
{
|
||||
QString str =
|
||||
"extern \"C\" void g_source_set_callback();"
|
||||
"\n"
|
||||
"int main()\n"
|
||||
"{\n"
|
||||
" g_source_set_callback();\n"
|
||||
" return 0;\n"
|
||||
"}\n";
|
||||
int ret;
|
||||
if (conf->doCompileAndLink(str, QStringList(), QString(), "CONFIG += qt", 0)) {
|
||||
qWarning("XMMS is not compatible with a QT linked with glib 2.x");
|
||||
return false;
|
||||
}
|
||||
QString s;
|
||||
|
||||
// XMMS
|
||||
s = conf->getenv("QC_WITH_XMMS_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkHeader(s, "xmms/util.h")) {
|
||||
qWarning("XMMS includes not found!");
|
||||
return false;
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
}
|
||||
else {
|
||||
QStringList sl;
|
||||
sl += "/usr/include";
|
||||
sl += "/usr/local/include";
|
||||
sl += "/sw/include";
|
||||
if(!conf->findHeader("xmms/util.h", sl, &s)) {
|
||||
qWarning("XMMS includes not found!");
|
||||
return false;
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
}
|
||||
|
||||
s = conf->getenv("QC_WITH_XMMS_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkLibrary(s, "xmms")) {
|
||||
qWarning("XMMS libraries not found!");
|
||||
return false;
|
||||
}
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
else {
|
||||
if(!conf->findLibrary("xmms", &s)) {
|
||||
qWarning("XMMS libraries not found!");
|
||||
return false;
|
||||
}
|
||||
if (!s.isEmpty())
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
|
||||
conf->addLib("-lxmms");
|
||||
|
||||
|
||||
// GLib
|
||||
s = conf->getenv("QC_WITH_GLIB_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(conf->checkHeader(s, "glib.h")) {
|
||||
conf->addIncludePath(s);
|
||||
}
|
||||
else {
|
||||
qWarning("GLib includes not found!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
QStringList sl;
|
||||
sl += "/usr/include/glib";
|
||||
sl += "/usr/local/include/glib";
|
||||
sl += "/usr/include/glib-1.2";
|
||||
sl += "/sw/include/glib-1.2";
|
||||
if(conf->findHeader("glib.h", sl, &s)) {
|
||||
conf->addIncludePath(s);
|
||||
}
|
||||
else {
|
||||
qWarning("GLib includes not found!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
s = conf->getenv("QC_WITH_GLIB_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(conf->checkLibrary(s, "glib")) {
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
else {
|
||||
qWarning("GLib 1.2.0 libraries not found!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(conf->findLibrary("glib", &s)) {
|
||||
if (!s.isEmpty())
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
else {
|
||||
qWarning("GLib 1.2 libraries not found!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
conf->addLib("-lglib");
|
||||
|
||||
// Glibconfig
|
||||
s = conf->getenv("QC_WITH_GLIBCONFIG_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(conf->checkHeader(s, "glibconfig.h")) {
|
||||
conf->addIncludePath(s);
|
||||
}
|
||||
else {
|
||||
qWarning("glibconfig.h includes not found!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(conf->findHeader("glibconfig.h", QStringList("/usr/lib/glib/include"), &s)) {
|
||||
conf->addIncludePath(s);
|
||||
}
|
||||
else {
|
||||
qWarning("glibconfig.h not found!");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Finish
|
||||
conf->addExtra("CONFIG += tc_xmms");
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
44
qcm/xss.qcm
Normal file
44
qcm/xss.qcm
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
-----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;
|
||||
}
|
||||
};
|
||||
55
qcm/zlib.qcm
Normal file
55
qcm/zlib.qcm
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: zlib
|
||||
arg: with-zlib-inc=[path],Path to zlib include files
|
||||
arg: with-zlib-lib=[path],Path to zlib library files
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// qc_zlib
|
||||
//----------------------------------------------------------------------------
|
||||
class qc_zlib : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_zlib(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "zlib"; }
|
||||
QString shortname() const { return "zlib"; }
|
||||
bool exec()
|
||||
{
|
||||
QString inc, lib;
|
||||
QString s;
|
||||
|
||||
s = conf->getenv("QC_WITH_ZLIB_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkHeader(s, "zlib.h"))
|
||||
return false;
|
||||
inc = s;
|
||||
}
|
||||
else {
|
||||
if(!conf->findHeader("zlib.h", QStringList(), &s))
|
||||
return false;
|
||||
inc = s;
|
||||
}
|
||||
|
||||
s = conf->getenv("QC_WITH_ZLIB_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkLibrary(s, "z"))
|
||||
return false;
|
||||
lib = s;
|
||||
}
|
||||
else {
|
||||
if(!conf->findLibrary("z", &s))
|
||||
return false;
|
||||
lib = s;
|
||||
}
|
||||
|
||||
if(!inc.isEmpty())
|
||||
conf->addIncludePath(inc);
|
||||
if(!lib.isEmpty())
|
||||
conf->addLib(QString("-L") + s);
|
||||
conf->addLib("-lz");
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
Reference in a new issue