forked from premiere/premiere-libtorrent
added m4 script for boost iostream and added ut_metadata to makefile
This commit is contained in:
parent
bd38a584cc
commit
fff87a6845
|
@ -33,6 +33,12 @@ dnl check asio version
|
|||
dnl Check for pthreads and boost libraries.
|
||||
ACX_PTHREAD
|
||||
|
||||
AX_BOOST_IOSTREAMS
|
||||
dnl check that Boost.IOStreams was found:
|
||||
if test -z "$BOOST_IOSTREAMS_LIB"; then
|
||||
AC_MSG_ERROR([unable to find Boost.IOStreams library, currently this is required.])
|
||||
fi
|
||||
|
||||
AX_BOOST_DATE_TIME
|
||||
|
||||
dnl check that Boost.DateTime was found:
|
||||
|
|
|
@ -15,4 +15,4 @@ simple_client_SOURCES = simple_client.cpp
|
|||
simple_client_LDADD = $(top_builddir)/src/libtorrent.la
|
||||
|
||||
AM_CXXFLAGS=-ftemplate-depth-50 -I$(top_srcdir)/include -I$(top_srcdir)/include/libtorrent @DEBUGFLAGS@ @PTHREAD_CFLAGS@ -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION
|
||||
AM_LDFLAGS= ${LDLAGS} -L./ -l@BOOST_DATE_TIME_LIB@ -l@BOOST_FILESYSTEM_LIB@ -l@BOOST_THREAD_LIB@ @PTHREAD_LIBS@ -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION
|
||||
AM_LDFLAGS= ${LDLAGS} -L./ -l@BOOST_IOSTREAMS_LIB@ -l@BOOST_DATE_TIME_LIB@ -l@BOOST_FILESYSTEM_LIB@ -l@BOOST_THREAD_LIB@ @PTHREAD_LIBS@ -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION
|
||||
|
|
|
@ -53,6 +53,7 @@ libtorrent/socks4_stream.hpp \
|
|||
libtorrent/socks5_stream.hpp \
|
||||
libtorrent/stat.hpp \
|
||||
libtorrent/storage.hpp \
|
||||
libtorrent/mapped_storage.hpp \
|
||||
libtorrent/time.hpp \
|
||||
libtorrent/torrent.hpp \
|
||||
libtorrent/torrent_handle.hpp \
|
||||
|
@ -67,6 +68,7 @@ libtorrent/time.hpp \
|
|||
libtorrent/aux_/session_impl.hpp \
|
||||
libtorrent/extensions/metadata_transfer.hpp \
|
||||
libtorrent/extensions/ut_pex.hpp \
|
||||
libtorrent/extensions/ut_metadata.hpp \
|
||||
libtorrent/extensions/logger.hpp \
|
||||
\
|
||||
libtorrent/kademlia/closest_nodes.hpp \
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
AC_DEFUN([AX_BOOST_IOSTREAMS],
|
||||
[AC_REQUIRE([AC_CXX_NAMESPACES])dnl
|
||||
AC_CACHE_CHECK(whether the Boost::IOStreams library is available,
|
||||
ax_cv_boost_iostreams,
|
||||
[AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([[@%:@include <boost/iostreams/filtering_stream.hpp>
|
||||
@%:@include <boost/range/iterator_range.hpp>]],
|
||||
[[std::string input = "Hello World!";namespace io = boost::iostreams;io::filtering_istream in(boost::make_iterator_range(input));return 0;]]
|
||||
),
|
||||
ax_cv_boost_iostreams=yes, ax_cv_boost_iostreams=no)
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
if test "$ax_cv_boost_iostreams" = yes; then
|
||||
AC_DEFINE(HAVE_BOOST_IOSTREAMS,,[define if the Boost::IOStreams library is available])
|
||||
dnl Now determine the appropriate file names
|
||||
AC_ARG_WITH([boost-iostreams],AS_HELP_STRING([--with-boost-iostreams],
|
||||
[specify the boost iostreams library or suffix to use]),
|
||||
[if test "x$with_boost_iostreams" != "xno"; then
|
||||
ax_iostreams_lib=$with_boost_iostreams
|
||||
ax_boost_iostreams_lib=boost_iostreams-$with_boost_iostreams
|
||||
fi])
|
||||
for ax_lib in $ax_iostreams_lib $ax_boost_iostreams_lib boost_iostreams; do
|
||||
AC_CHECK_LIB($ax_lib, main, [BOOST_IOSTREAMS_LIB=$ax_lib break])
|
||||
done
|
||||
AC_SUBST(BOOST_IOSTREAMS_LIB)
|
||||
fi
|
||||
])dnl
|
|
@ -22,7 +22,7 @@ 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 instantiate_connection.cpp \
|
||||
socks5_stream.cpp socks4_stream.cpp http_stream.cpp connection_queue.cpp \
|
||||
disk_io_thread.cpp \
|
||||
disk_io_thread.cpp ut_metadata.cpp \
|
||||
$(kademlia_sources)
|
||||
|
||||
noinst_HEADERS = \
|
||||
|
@ -94,8 +94,8 @@ $(top_srcdir)/include/libtorrent/version.hpp
|
|||
|
||||
|
||||
libtorrent_la_LDFLAGS = $(LDFLAGS) -release @VERSION@
|
||||
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_IOSTREAMS_LIB@ -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@ -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION
|
||||
AM_LDFLAGS= $(LDFLAGS) -l@BOOST_DATE_TIME_LIB@ -l@BOOST_FILESYSTEM_LIB@ -l@BOOST_THREAD_LIB@ @PTHREAD_LIBS@
|
||||
AM_LDFLAGS= $(LDFLAGS) -l@BOOST_IOSTREAMS_LIB@ -l@BOOST_DATE_TIME_LIB@ -l@BOOST_FILESYSTEM_LIB@ -l@BOOST_THREAD_LIB@ @PTHREAD_LIBS@
|
||||
|
||||
|
|
Loading…
Reference in New Issue