mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-22 01:06:03 +03:00
- Added configure parameter :
--with-libcurl-lib=[path] Path to libcurl library files
This commit is contained in:
parent
8f9a37ee2f
commit
43195b7ada
3 changed files with 58 additions and 8 deletions
37
configure
vendored
37
configure
vendored
|
@ -21,6 +21,7 @@ Dependency options:
|
|||
--with-libtorrent-inc=[path] Path to libtorrent include files
|
||||
--with-libtorrent-lib=[path] Path to libtorrent library files
|
||||
--with-libcurl-inc=[path] Path to libcurl include files
|
||||
--with-libcurl-lib=[path] Path to libcurl library files
|
||||
|
||||
EOT
|
||||
}
|
||||
|
@ -152,6 +153,11 @@ while [ $# -gt 0 ]; do
|
|||
shift
|
||||
;;
|
||||
|
||||
--with-libcurl-lib=*)
|
||||
QC_WITH_LIBCURL_LIB=$optarg
|
||||
shift
|
||||
;;
|
||||
|
||||
--verbose)
|
||||
QC_DEBUG="Y"
|
||||
shift
|
||||
|
@ -176,6 +182,7 @@ echo EX_QTDIR=$EX_QTDIR
|
|||
echo QC_WITH_LIBTORRENT_INC=$QC_WITH_LIBTORRENT_INC
|
||||
echo QC_WITH_LIBTORRENT_LIB=$QC_WITH_LIBTORRENT_LIB
|
||||
echo QC_WITH_LIBCURL_INC=$QC_WITH_LIBCURL_INC
|
||||
echo QC_WITH_LIBCURL_LIB=$QC_WITH_LIBCURL_LIB
|
||||
echo
|
||||
fi
|
||||
|
||||
|
@ -293,7 +300,10 @@ public:
|
|||
}
|
||||
conf->addIncludePath(s);
|
||||
}else{
|
||||
if(!conf->findHeader("libtorrent/extensions/ut_pex.hpp", QStringList(), &s)) {
|
||||
QStringList sl;
|
||||
sl << "/usr/include/";
|
||||
sl << "/usr/local/include";
|
||||
if(!conf->findHeader("libtorrent/extensions/ut_pex.hpp", sl, &s)) {
|
||||
qWarning("libtorrent v0.12 includes not found!\nYou can download it at http://www.libtorrent.net");
|
||||
return false;
|
||||
}
|
||||
|
@ -367,6 +377,7 @@ public:
|
|||
-----BEGIN QCMOD-----
|
||||
name: libcurl
|
||||
arg: with-libcurl-inc=[path], Path to libcurl include files
|
||||
arg: with-libcurl-lib=[path], Path to libcurl library files
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
class qc_libcurl : public ConfObj
|
||||
|
@ -384,19 +395,36 @@ public:
|
|||
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;
|
||||
}
|
||||
|
||||
s = conf->getenv("QC_WITH_LIBCURL_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkLibrary(s, "curl")) {
|
||||
qWarning("libcurl library not found!");
|
||||
return false;
|
||||
}
|
||||
conf->addLib(QString("-L") + s);
|
||||
}else{
|
||||
if(!conf->findLibrary("curl", &s)) {
|
||||
qWarning("libcurl library not found!");
|
||||
return false;
|
||||
}
|
||||
if (!s.isEmpty())
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
|
||||
conf->addLib("-lcurl");
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
#line 1 "python.qcm"
|
||||
|
@ -1366,6 +1394,7 @@ export EX_QTDIR
|
|||
export QC_WITH_LIBTORRENT_INC
|
||||
export QC_WITH_LIBTORRENT_LIB
|
||||
export QC_WITH_LIBCURL_INC
|
||||
export QC_WITH_LIBCURL_LIB
|
||||
export QC_DEBUG
|
||||
rm -rf .qconftemp
|
||||
(
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
-----BEGIN QCMOD-----
|
||||
name: libcurl
|
||||
arg: with-libcurl-inc=[path], Path to libcurl include files
|
||||
arg: with-libcurl-lib=[path], Path to libcurl library files
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
class qc_libcurl : public ConfObj
|
||||
|
@ -19,18 +20,35 @@ public:
|
|||
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;
|
||||
}
|
||||
|
||||
s = conf->getenv("QC_WITH_LIBCURL_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkLibrary(s, "curl")) {
|
||||
qWarning("libcurl library not found!");
|
||||
return false;
|
||||
}
|
||||
conf->addLib(QString("-L") + s);
|
||||
}else{
|
||||
if(!conf->findLibrary("curl", &s)) {
|
||||
qWarning("libcurl library not found!");
|
||||
return false;
|
||||
}
|
||||
if (!s.isEmpty())
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
|
||||
conf->addLib("-lcurl");
|
||||
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
|
|
@ -21,7 +21,10 @@ public:
|
|||
}
|
||||
conf->addIncludePath(s);
|
||||
}else{
|
||||
if(!conf->findHeader("libtorrent/extensions/ut_pex.hpp", QStringList(), &s)) {
|
||||
QStringList sl;
|
||||
sl << "/usr/include/";
|
||||
sl << "/usr/local/include";
|
||||
if(!conf->findHeader("libtorrent/extensions/ut_pex.hpp", sl, &s)) {
|
||||
qWarning("libtorrent v0.12 includes not found!\nYou can download it at http://www.libtorrent.net");
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue