From b08037d09466ff213c0c604f946177fb8543a871 Mon Sep 17 00:00:00 2001 From: peerkoel Date: Fri, 13 Apr 2007 16:11:11 +0000 Subject: [PATCH] Test added to allow conditional compilation of sources in src/kademlia. New file time.hpp added to header files that need to be installed. --- configure.in | 1 + src/Makefile.am | 31 +++++++++++++++++-------------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/configure.in b/configure.in index 9f3ce983d..935faa55b 100644 --- a/configure.in +++ b/configure.in @@ -137,6 +137,7 @@ case "$dht" in AC_MSG_ERROR([Unknown dht-dupport option "$dht". Use either "on", "off" or "logging".]) ;; esac +AM_CONDITIONAL(USE_DHT, test "x$dht" != "xoff") dnl the user can choose which zlib to use AC_ARG_WITH( diff --git a/src/Makefile.am b/src/Makefile.am index e50d69675..a432feafc 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,5 +1,17 @@ lib_LTLIBRARIES = libtorrent.la +if USE_DHT +kademlia_sources = kademlia/closest_nodes.cpp \ +kademlia/dht_tracker.cpp \ +kademlia/find_data.cpp \ +kademlia/node.cpp \ +kademlia/node_id.cpp \ +kademlia/refresh.cpp \ +kademlia/routing_table.cpp \ +kademlia/rpc_manager.cpp \ +kademlia/traversal_algorithm.cpp +endif + libtorrent_la_SOURCES = allocate_resources.cpp \ bandwidth_manager.cpp entry.cpp escape_string.cpp \ peer_connection.cpp bt_peer_connection.cpp web_peer_connection.cpp \ @@ -8,17 +20,7 @@ stat.cpp storage.cpp torrent.cpp torrent_handle.cpp \ torrent_info.cpp tracker_manager.cpp http_connection.cpp \ http_tracker_connection.cpp udp_tracker_connection.cpp \ alert.cpp identify_client.cpp ip_filter.cpp file.cpp metadata_transfer.cpp \ -logger.cpp file_pool.cpp ut_pex.cpp lsd.cpp upnp.cpp \ -\ -kademlia/closest_nodes.cpp \ -kademlia/dht_tracker.cpp \ -kademlia/find_data.cpp \ -kademlia/node.cpp \ -kademlia/node_id.cpp \ -kademlia/refresh.cpp \ -kademlia/routing_table.cpp \ -kademlia/rpc_manager.cpp \ -kademlia/traversal_algorithm.cpp +logger.cpp file_pool.cpp ut_pex.cpp lsd.cpp upnp.cpp $(kademlia_sources) noinst_HEADERS = \ $(top_srcdir)/include/libtorrent/alert.hpp \ @@ -66,6 +68,7 @@ $(top_srcdir)/include/libtorrent/size_type.hpp \ $(top_srcdir)/include/libtorrent/socket.hpp \ $(top_srcdir)/include/libtorrent/stat.hpp \ $(top_srcdir)/include/libtorrent/storage.hpp \ +$(top_srcdir)/include/libtorrent/time.hpp \ $(top_srcdir)/include/libtorrent/torrent.hpp \ $(top_srcdir)/include/libtorrent/torrent_handle.hpp \ $(top_srcdir)/include/libtorrent/torrent_info.hpp \ @@ -77,8 +80,8 @@ $(top_srcdir)/include/libtorrent/version.hpp libtorrent_la_LDFLAGS = $(LDFLAGS) -version-info 1:0:1 -libtorrent_la_LIBADD = @ZLIB@ -l@BOOST_DATE_TIME_LIB@ -l@BOOST_FILESYSTEM_LIB@ -l@BOOST_THREAD_LIB@ @PTHREAD_LIBS@ +libtorrent_la_LIBADD = @ZLIB@ -l@BOOST_DATE_TIME_LIB@ -l@BOOST_FILESYSTEM_LIB@ -l@BOOST_THREAD_LIB@ @PTHREAD_LIBS@ -AM_CXXFLAGS= -ftemplate-depth-50 -I$(top_srcdir)/include -I$(top_srcdir)/include/libtorrent @ZLIBINCL@ @DEBUGFLAGS@ @PTHREAD_CFLAGS@ -AM_LDFLAGS= $(LDFLAGS) -l@BOOST_DATE_TIME_LIB@ -l@BOOST_FILESYSTEM_LIB@ -l@BOOST_THREAD_LIB@ @PTHREAD_LIBS@ +AM_CXXFLAGS= -ftemplate-depth-50 -I$(top_srcdir)/include -I$(top_srcdir)/include/libtorrent @ZLIBINCL@ @DEBUGFLAGS@ @PTHREAD_CFLAGS@ +AM_LDFLAGS= $(LDFLAGS) -l@BOOST_DATE_TIME_LIB@ -l@BOOST_FILESYSTEM_LIB@ -l@BOOST_THREAD_LIB@ @PTHREAD_LIBS@