diff --git a/Jamfile b/Jamfile index 04473939f..d92a7cb53 100755 --- a/Jamfile +++ b/Jamfile @@ -173,13 +173,27 @@ rule linking ( properties * ) else { result += /boost/system//boost_system/shared ; + + # when building a shared library with openssl, for some reason we really need + # boost date time (at least on windows). Hopefully a future version of asio + # will allow disabling this dependency + if openssl in $(properties) + { + result += /boost/date_time//boost_date_time/shared ; + } } result += $(BOOST_ROOT) BOOST_ALL_NO_LIB ; + } else { result += boost_system ; + if shared in $(properties) && openssl in $(properties) + { + result += boost_date_time ; + } + # on mac the boost headers are installed in # a directory that isn't automatically accessable # on open indiana, boost is install at /usr/g++/include @@ -411,11 +425,13 @@ local boost-library-search-path = ; lib boost_system : : darwin boost_system-mt $(boost-library-search-path) ; - lib boost_system : : solaris boost_system $(boost-library-search-path) ; - lib boost_system : : boost_system ; +lib boost_date_time : : darwin boost_date_time-mt $(boost-library-search-path) ; +lib boost_date_time : : solaris boost_date_time $(boost-library-search-path) ; +lib boost_date_time : : boost_date_time ; + # openssl on linux/bsd/macos etc. lib gcrypt : : gcrypt shared /opt/local/lib ; lib z : : shared z /lib ; diff --git a/src/asio.cpp b/src/asio.cpp index fea57e283..249bc8882 100644 --- a/src/asio.cpp +++ b/src/asio.cpp @@ -51,7 +51,9 @@ #include #include #include -//#include +#if defined TORRENT_USE_OPENSSL +#include +#endif #include #include #include