initial commit
This commit is contained in:
commit
9d20827c46
2469 changed files with 470994 additions and 0 deletions
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;
|
||||
}
|
||||
};
|
||||
Reference in a new issue