diff --git a/Changelog b/Changelog
index 50104bcac..6bdf25b5e 100644
--- a/Changelog
+++ b/Changelog
@@ -16,6 +16,7 @@
- FEATURE: Supports SOCKS5 proxies as well as HTTP ones
- FEATURE: Better systems integration (buttons, dialogs...)
- FEATURE: Filtered files are not allocated on the hard-drive anymore (if FS is compatible)
+ - FEATURE: Added a way to link against static libtorrent (useful for deb packages)
- COSMETIC: Redesigned torrent properties a little
- COSMETIC: Redesigned options a little
- COSMETIC: Display more logs messages concerning features
diff --git a/configure b/configure
index b362c1b72..9a6b35a5f 100755
--- a/configure
+++ b/configure
@@ -18,11 +18,12 @@ Main options:
--help This help text.
Dependency options:
- --with-libtorrent-inc=[path] Path to libtorrent include files
- --with-libtorrent-lib=[path] Path to libtorrent library files
- --with-libboost-inc=[path] Path to libboost include files
- --with-libcurl-inc=[path] Path to libcurl include files
- --with-libcurl-lib=[path] Path to libcurl library files
+ --with-libtorrent-inc=[path] Path to libtorrent include files
+ --with-libtorrent-lib=[path] Path to libtorrent library files
+ --with-libtorrent-static-lib=[path] Path to libtorrent .a file
+ --with-libboost-inc=[path] Path to libboost include files
+ --with-libcurl-inc=[path] Path to libcurl include files
+ --with-libcurl-lib=[path] Path to libcurl library files
EOT
}
@@ -149,6 +150,11 @@ while [ $# -gt 0 ]; do
shift
;;
+ --with-libtorrent-static-lib=*)
+ QC_WITH_LIBTORRENT_STATIC_LIB=$optarg
+ shift
+ ;;
+
--with-libboost-inc=*)
QC_WITH_LIBBOOST_INC=$optarg
shift
@@ -187,6 +193,7 @@ echo DATADIR=$DATADIR
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_LIBTORRENT_STATIC_LIB=$QC_WITH_LIBTORRENT_STATIC_LIB
echo QC_WITH_LIBBOOST_INC=$QC_WITH_LIBBOOST_INC
echo QC_WITH_LIBCURL_INC=$QC_WITH_LIBCURL_INC
echo QC_WITH_LIBCURL_LIB=$QC_WITH_LIBCURL_LIB
@@ -289,6 +296,7 @@ public:
name: libtorrent
arg: with-libtorrent-inc=[path], Path to libtorrent include files
arg: with-libtorrent-lib=[path], Path to libtorrent library files
+arg: with-libtorrent-static-lib=[path], Path to libtorrent .a file
-----END QCMOD-----
*/
class qc_libtorrent : public ConfObj
@@ -322,6 +330,12 @@ public:
conf->addIncludePath(s);
conf->addIncludePath(s+QDir::separator()+"libtorrent");
+ s = conf->getenv("QC_WITH_LIBTORRENT_STATIC_LIB");
+ if(!s.isEmpty() && QFile::exists(s) && s.endsWith(".a")){
+ conf->addLib(s);
+ return true;
+ }
+
s = conf->getenv("QC_WITH_LIBTORRENT_LIB");
if(!s.isEmpty()) {
if(!conf->checkLibrary(s, "torrent")) {
@@ -1431,6 +1445,7 @@ export DATADIR
export EX_QTDIR
export QC_WITH_LIBTORRENT_INC
export QC_WITH_LIBTORRENT_LIB
+export QC_WITH_LIBTORRENT_STATIC_LIB
export QC_WITH_LIBBOOST_INC
export QC_WITH_LIBCURL_INC
export QC_WITH_LIBCURL_LIB
diff --git a/qBittorrent.kdevelop b/qBittorrent.kdevelop
index 5c594ab10..c126f33ec 100644
--- a/qBittorrent.kdevelop
+++ b/qBittorrent.kdevelop
@@ -13,8 +13,8 @@
.
false
-
-
+
+
kdevsubversion
@@ -72,11 +72,11 @@
-
-
-
-
-
+
+
+
+
+
true
false
false
@@ -99,8 +99,8 @@
- automatic_%2Fhome%2Fchris%2Fqbittorrent_svn%2Ftrunk
Qt4
+ automatic_%2Fhome%2Fchris%2Fqbittorrent_svn%2Ftrunk
true
@@ -154,8 +154,8 @@
executable
/home/chris/qbittorrent_svn/trunk
-
-
+
+
/home/chris/qbittorrent_svn/trunk
false
false
@@ -169,7 +169,7 @@
false
1
false
-
+
0
@@ -186,7 +186,7 @@
-
+
/home/chris/qbittorrent_svn/trunk/tags
diff --git a/qcm/libtorrent.qcm b/qcm/libtorrent.qcm
index 27e248085..d278a3b7a 100644
--- a/qcm/libtorrent.qcm
+++ b/qcm/libtorrent.qcm
@@ -3,6 +3,7 @@
name: libtorrent
arg: with-libtorrent-inc=[path], Path to libtorrent include files
arg: with-libtorrent-lib=[path], Path to libtorrent library files
+arg: with-libtorrent-static-lib=[path], Path to libtorrent .a file
-----END QCMOD-----
*/
class qc_libtorrent : public ConfObj
@@ -36,6 +37,12 @@ public:
conf->addIncludePath(s);
conf->addIncludePath(s+QDir::separator()+"libtorrent");
+ s = conf->getenv("QC_WITH_LIBTORRENT_STATIC_LIB");
+ if(!s.isEmpty() && QFile::exists(s) && s.endsWith(".a")){
+ conf->addLib(s);
+ return true;
+ }
+
s = conf->getenv("QC_WITH_LIBTORRENT_LIB");
if(!s.isEmpty()) {
if(!conf->checkLibrary(s, "torrent")) {