~ubuntu-branches/ubuntu/feisty/psi/feisty

« back to all changes in this revision

Viewing changes to qcm/qca.qcm

  • Committer: Bazaar Package Importer
  • Author(s): Stephan Hermann
  • Date: 2005-09-14 16:33:49 UTC
  • mfrom: (2.1.1 sarge)
  • Revision ID: james.westby@ubuntu.com-20050914163349-3zacov4afysz5cw5
Tags: 0.9.3-2ubuntu1
* Sync with debian
* Applied patch to psi.desktop to start psi without gpg-agent use (known
  issue)
* Updated README.Debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
-----BEGIN QCMOD-----
 
3
name: QCA 1.0
 
4
arg: with-qca-inc=[path],Path to QCA include files
 
5
arg: with-qca-lib=[path],Path to QCA library files
 
6
-----END QCMOD-----
 
7
*/
 
8
 
 
9
//----------------------------------------------------------------------------
 
10
// qc_qca
 
11
//----------------------------------------------------------------------------
 
12
class qc_qca : public ConfObj
 
13
{
 
14
public:
 
15
        qc_qca(Conf *c) : ConfObj(c) {}
 
16
        QString name() const { return "QCA 1.0"; }
 
17
        QString shortname() const { return "qca"; }
 
18
        bool exec()
 
19
        {
 
20
                QString inc, lib;
 
21
                QString s;
 
22
 
 
23
                s = conf->getenv("QC_WITH_QCA_INC");
 
24
                if(!s.isEmpty()) {
 
25
                        if(!conf->checkHeader(s, "qca.h"))
 
26
                                return false;
 
27
                        inc = s;
 
28
                }
 
29
                else {
 
30
                        if(!conf->findHeader("qca.h", QStringList(), &s))
 
31
                                return false;
 
32
                        inc = s;
 
33
                }
 
34
 
 
35
                s = conf->getenv("QC_WITH_QCA_LIB");
 
36
                if(!s.isEmpty()) {
 
37
                        if(!conf->checkLibrary(s, "qca"))
 
38
                                return false;
 
39
                        lib = s;
 
40
                }
 
41
                else {
 
42
                        if(!conf->findLibrary("qca", &s))
 
43
                                return false;
 
44
                        lib = s;
 
45
                }
 
46
 
 
47
                if(!inc.isEmpty())
 
48
                        conf->addIncludePath(inc);
 
49
                if(!lib.isEmpty())
 
50
                        conf->addLib(QString("-L") + s);
 
51
                conf->addLib("-lqca");
 
52
 
 
53
                return true;
 
54
        }
 
55
};