]> granicus.if.org Git - transmission/commitdiff
#5809: Allow building against system dht library (patch by jbeich)
authorMike Gelfand <mikedld@mikedld.com>
Sun, 28 Dec 2014 00:14:46 +0000 (00:14 +0000)
committerMike Gelfand <mikedld@mikedld.com>
Sun, 28 Dec 2014 00:14:46 +0000 (00:14 +0000)
configure.ac
third-party/Makefile.am

index fee10fbc0e3e99a09aa3acf17af714d959375eda..dd70d3ba4105be9dab404e91d8e4f2c9240b15fb 100644 (file)
@@ -197,6 +197,20 @@ dnl  dht
 DHT_CFLAGS="-I\$(top_srcdir)/third-party/dht"
 DHT_LIBS="\$(top_builddir)/third-party/dht/libdht.a"
 DHT_LIBS_QT="\$\${TRANSMISSION_TOP}/third-party/dht/libdht.a"
+build_bundled_dht="yes"
+AC_ARG_ENABLE([external-dht],
+              AS_HELP_STRING([--enable-external-dht],[Use system external-dht]),
+              [want_external_dht=${enableval}],
+              [want_external_dht=no])
+if test "x$want_external_dht" != "xno" ; then
+       dnl Would be lovely if it had pkgconfig
+       DHT_CFLAGS=""
+       DHT_LIBS="-ldht"
+       DHT_LIBS_QT="-ldht"
+       build_bundled_dht="no"
+fi
+
+AM_CONDITIONAL([BUILD_DHT],[test "x$build_bundled_dht" = "xyes"])
 AC_SUBST(DHT_CFLAGS)
 AC_SUBST(DHT_LIBS)
 AC_SUBST(DHT_LIBS_QT)
index 3c86980536152c384db68f248b5cd9a01fb345a7..774948d6b7391f202b7e247c8a012d968bf03b63 100644 (file)
@@ -1,3 +1,6 @@
+if BUILD_DHT
+  DHT_DIR = dht
+endif
 if BUILD_UTP
   UTP_DIR = libutp
 endif
@@ -9,7 +12,7 @@ if BUILD_NATPMP
 endif 
 
 SUBDIRS = \
-  dht \
+  $(DHT_DIR) \
   $(NATPMP_DIR) \
   $(MINIUPNP_DIR) \
   $(UTP_DIR)