Added a parameter to the configure file:

--with-libcurl-inc=[path]        Path to libcurl include files
This commit is contained in:
Christophe Dumez 2007-03-12 12:25:58 +00:00
commit 572d4013e7
2 changed files with 50 additions and 20 deletions

View file

@ -1,6 +1,7 @@
/*
-----BEGIN QCMOD-----
name: libcurl
arg: with-libcurl-inc=[path], Path to libcurl include files
-----END QCMOD-----
*/
class qc_libcurl : public ConfObj
@ -11,15 +12,25 @@ public:
QString shortname() const { return "libcurl"; }
bool exec(){
QString s;
QStringList sl;
sl += "/usr/include";
sl += "/usr/local/include";
sl += "/sw/include";
if(!conf->findHeader("curl/curl.h", sl, &s)) {
qWarning("libcurl includes not found!\n");
return false;
}
conf->addIncludePath(s);
return true;
s = conf->getenv("QC_WITH_LIBCURL_INC");
if(!s.isEmpty()) {
if(!conf->checkHeader(s, "curl/curl.h")) {
qWarning("libcurl includes not found!");
return false;
}
conf->addIncludePath(s);
return true;
}else{
QStringList sl;
sl += "/usr/include";
sl += "/usr/local/include";
sl += "/sw/include";
if(!conf->findHeader("curl/curl.h", sl, &s)) {
qWarning("libcurl includes not found!");
return false;
}
conf->addIncludePath(s);
return true;
}
}
};