Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 4df430410f
Fetching contributors…

Cannot retrieve contributors at this time

63 lines (56 sloc) 1.48 kb
/*
-----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;
}
};
Jump to Line
Something went wrong with that request. Please try again.