mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-22 12:34:19 +00:00
Added a parameter to the configure file:
--with-libcurl-inc=[path] Path to libcurl include files
This commit is contained in:
parent
3c28c04b40
commit
572d4013e7
39
configure
vendored
39
configure
vendored
@ -19,6 +19,7 @@ Main options:
|
|||||||
|
|
||||||
Dependency options:
|
Dependency options:
|
||||||
--with-libtorrent-inc=[path] Path to libtorrent include files
|
--with-libtorrent-inc=[path] Path to libtorrent include files
|
||||||
|
--with-libcurl-inc=[path] Path to libcurl include files
|
||||||
|
|
||||||
EOT
|
EOT
|
||||||
}
|
}
|
||||||
@ -140,6 +141,11 @@ while [ $# -gt 0 ]; do
|
|||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
--with-libcurl-inc=*)
|
||||||
|
QC_WITH_LIBCURL_INC=$optarg
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
|
||||||
--verbose)
|
--verbose)
|
||||||
QC_DEBUG="Y"
|
QC_DEBUG="Y"
|
||||||
shift
|
shift
|
||||||
@ -162,6 +168,7 @@ echo BINDIR=$BINDIR
|
|||||||
echo DATADIR=$DATADIR
|
echo DATADIR=$DATADIR
|
||||||
echo EX_QTDIR=$EX_QTDIR
|
echo EX_QTDIR=$EX_QTDIR
|
||||||
echo QC_WITH_LIBTORRENT_INC=$QC_WITH_LIBTORRENT_INC
|
echo QC_WITH_LIBTORRENT_INC=$QC_WITH_LIBTORRENT_INC
|
||||||
|
echo QC_WITH_LIBCURL_INC=$QC_WITH_LIBCURL_INC
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -337,6 +344,7 @@ public:
|
|||||||
/*
|
/*
|
||||||
-----BEGIN QCMOD-----
|
-----BEGIN QCMOD-----
|
||||||
name: libcurl
|
name: libcurl
|
||||||
|
arg: with-libcurl-inc=[path], Path to libcurl include files
|
||||||
-----END QCMOD-----
|
-----END QCMOD-----
|
||||||
*/
|
*/
|
||||||
class qc_libcurl : public ConfObj
|
class qc_libcurl : public ConfObj
|
||||||
@ -347,16 +355,26 @@ public:
|
|||||||
QString shortname() const { return "libcurl"; }
|
QString shortname() const { return "libcurl"; }
|
||||||
bool exec(){
|
bool exec(){
|
||||||
QString s;
|
QString s;
|
||||||
QStringList sl;
|
s = conf->getenv("QC_WITH_LIBCURL_INC");
|
||||||
sl += "/usr/include";
|
if(!s.isEmpty()) {
|
||||||
sl += "/usr/local/include";
|
if(!conf->checkHeader(s, "curl/curl.h")) {
|
||||||
sl += "/sw/include";
|
qWarning("libcurl includes not found!");
|
||||||
if(!conf->findHeader("curl/curl.h", sl, &s)) {
|
return false;
|
||||||
qWarning("libcurl includes not found!\n");
|
}
|
||||||
return false;
|
conf->addIncludePath(s);
|
||||||
}
|
return true;
|
||||||
conf->addIncludePath(s);
|
}else{
|
||||||
return true;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
#line 1 "python.qcm"
|
#line 1 "python.qcm"
|
||||||
@ -1324,6 +1342,7 @@ export BINDIR
|
|||||||
export DATADIR
|
export DATADIR
|
||||||
export EX_QTDIR
|
export EX_QTDIR
|
||||||
export QC_WITH_LIBTORRENT_INC
|
export QC_WITH_LIBTORRENT_INC
|
||||||
|
export QC_WITH_LIBCURL_INC
|
||||||
export QC_DEBUG
|
export QC_DEBUG
|
||||||
rm -rf .qconftemp
|
rm -rf .qconftemp
|
||||||
(
|
(
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
-----BEGIN QCMOD-----
|
-----BEGIN QCMOD-----
|
||||||
name: libcurl
|
name: libcurl
|
||||||
|
arg: with-libcurl-inc=[path], Path to libcurl include files
|
||||||
-----END QCMOD-----
|
-----END QCMOD-----
|
||||||
*/
|
*/
|
||||||
class qc_libcurl : public ConfObj
|
class qc_libcurl : public ConfObj
|
||||||
@ -11,15 +12,25 @@ public:
|
|||||||
QString shortname() const { return "libcurl"; }
|
QString shortname() const { return "libcurl"; }
|
||||||
bool exec(){
|
bool exec(){
|
||||||
QString s;
|
QString s;
|
||||||
QStringList sl;
|
s = conf->getenv("QC_WITH_LIBCURL_INC");
|
||||||
sl += "/usr/include";
|
if(!s.isEmpty()) {
|
||||||
sl += "/usr/local/include";
|
if(!conf->checkHeader(s, "curl/curl.h")) {
|
||||||
sl += "/sw/include";
|
qWarning("libcurl includes not found!");
|
||||||
if(!conf->findHeader("curl/curl.h", sl, &s)) {
|
return false;
|
||||||
qWarning("libcurl includes not found!\n");
|
}
|
||||||
return false;
|
conf->addIncludePath(s);
|
||||||
}
|
return true;
|
||||||
conf->addIncludePath(s);
|
}else{
|
||||||
return true;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user